Class: Eson::Search::FieldBased
- Inherits:
-
Object
- Object
- Eson::Search::FieldBased
- Defined in:
- lib/eson/search/field_based.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
Returns the value of attribute field.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(*args) ⇒ FieldBased
constructor
A new instance of FieldBased.
- #to_query_hash ⇒ Object
Constructor Details
#initialize(*args) ⇒ FieldBased
Returns a new instance of FieldBased.
7 8 9 10 11 12 13 |
# File 'lib/eson/search/field_based.rb', line 7 def initialize(*args) if args.length == 1 self. = args.first else self.field = QueryField.new(*args) end end |
Instance Attribute Details
#field ⇒ Object
Returns the value of attribute field.
4 5 6 |
# File 'lib/eson/search/field_based.rb', line 4 def field @field end |
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'lib/eson/search/field_based.rb', line 5 def @options end |
Instance Method Details
#to_query_hash ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/eson/search/field_based.rb', line 15 def to_query_hash if field field.to_query_hash else {name => } end end |