# File 'lib/groonga/query-logger.rb', line 43defparse(input,base_flags=nil)base_flags||=Flags::NONEcaseinputwhennilbase_flagswhenIntegerinput|base_flagswhenString,Symbolvalue=NAMES[input.to_sym]ifvalue.nil?message="flag name must be one of #{NAMES.keys.inspect}: "+"<#{input.inspect}>"raiseArgumentError,messageendvalue|base_flagswhen::Arrayinput.inject(base_flags)do|flags,sub_input|parse(sub_input,flags)endwhen::Hashflags=base_flagsinput.eachdo|key,use_key|ifuse_keyflags=parse(key,flags)elseflags&=~parse(key,0)endendflagselsemessage="flags value must be nil, Integer, names, "+"Array of flag or Hash of name and boolean: <#{input.inspect}>"raiseArgumentError,messageendend