Class: Groonga::Command::QueryExpand
- Defined in:
- lib/groonga/command/query-expand.rb
Overview
A command class that represents query_expand command.
Instance Attribute Summary
Attributes inherited from Base
#arguments, #command_name, #original_format, #original_source, #path_prefix
Class Method Summary collapse
Instance Method Summary collapse
-
#allow_column? ⇒ Boolean
trueif"ALLOW_COLUMN"is specified in #flags,falseotherwise. -
#allow_leading_not? ⇒ Boolean
trueif"ALLOW_LEADING_NOT"is specified in #flags,falseotherwise. -
#allow_pragma? ⇒ Boolean
trueif"ALLOW_PRAGMA"is specified in #flags,falseotherwise. -
#allow_update? ⇒ Boolean
trueif"ALLOW_UPDATE"is specified in #flags,falseotherwise. -
#expander ⇒ String
expanderparameter value. -
#flags ⇒ Array<String>
flagsparameter value. -
#none? ⇒ Boolean
trueif"NONE"is specified in #flags,falseotherwise. -
#query ⇒ String
queryparameter value.
Methods inherited from Base
#==, #[], #[]=, #command_format?, #initialize, #key?, #name, #output_type, #request_id, #to_command_format, #to_uri_format, #uri_format?
Constructor Details
This class inherits a constructor from Groonga::Command::Base
Class Method Details
.parameter_names ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/groonga/command/query-expand.rb', line 28 def parameter_names [ :expander, :query, :flags, ] end |
Instance Method Details
#allow_column? ⇒ Boolean
Returns true if "ALLOW_COLUMN" is specified in
#flags, false otherwise.
70 71 72 |
# File 'lib/groonga/command/query-expand.rb', line 70 def allow_column? flags.include?("ALLOW_COLUMN") end |
#allow_leading_not? ⇒ Boolean
Returns true if "ALLOW_LEADING_NOT" is specified in
#flags, false otherwise.
86 87 88 |
# File 'lib/groonga/command/query-expand.rb', line 86 def allow_leading_not? flags.include?("ALLOW_LEADING_NOT") end |
#allow_pragma? ⇒ Boolean
Returns true if "ALLOW_PRAGMA" is specified in
#flags, false otherwise.
62 63 64 |
# File 'lib/groonga/command/query-expand.rb', line 62 def allow_pragma? flags.include?("ALLOW_PRAGMA") end |
#allow_update? ⇒ Boolean
Returns true if "ALLOW_UPDATE" is specified in
#flags, false otherwise.
78 79 80 |
# File 'lib/groonga/command/query-expand.rb', line 78 def allow_update? flags.include?("ALLOW_UPDATE") end |
#expander ⇒ String
Returns expander parameter value.
40 41 42 |
# File 'lib/groonga/command/query-expand.rb', line 40 def self[:expander] end |
#flags ⇒ Array<String>
Returns flags parameter value.
54 55 56 |
# File 'lib/groonga/command/query-expand.rb', line 54 def flags @flags ||= (self[:flags] || "").split(/(?:\s*\|\s*)|(?:\s+)/) end |
#none? ⇒ Boolean
Returns true if "NONE" is specified in #flags,
false otherwise.
94 95 96 |
# File 'lib/groonga/command/query-expand.rb', line 94 def none? flags.include?("NONE") end |
#query ⇒ String
Returns query parameter value.
47 48 49 |
# File 'lib/groonga/command/query-expand.rb', line 47 def query self[:query] end |