Class: Eson::Search::NumericRange
- Inherits:
-
Object
- Object
- Eson::Search::NumericRange
- Includes:
- Filter
- Defined in:
- lib/eson/search/numeric_range.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
Returns the value of attribute field.
Instance Method Summary collapse
-
#initialize(field, options = {}) ⇒ NumericRange
constructor
A new instance of NumericRange.
-
#numeric_range { ... } ⇒ self
Generates a ‘numeric_range` filter in a filter context.
- #to_query_hash ⇒ Object
Methods included from Filter
Constructor Details
#initialize(field, options = {}) ⇒ NumericRange
Returns a new instance of NumericRange.
11 12 13 |
# File 'lib/eson/search/numeric_range.rb', line 11 def initialize(field, = {}) self.field = QueryField.new(field, ) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Eson::Search::Filter
Instance Attribute Details
#field ⇒ Object
Returns the value of attribute field.
9 10 11 |
# File 'lib/eson/search/numeric_range.rb', line 9 def field @field end |
Instance Method Details
#numeric_range { ... } ⇒ self
7 |
# File 'lib/eson/search/numeric_range.rb', line 7 short_name :numeric_range |
#to_query_hash ⇒ Object
15 16 17 |
# File 'lib/eson/search/numeric_range.rb', line 15 def to_query_hash {name => field.to_query_hash} end |