Class: Eson::Search::Range

Inherits:
Object
  • Object
show all
Includes:
Facet, Filter, Query
Defined in:
lib/eson/search/range.rb

Instance Attribute Summary collapse

Attributes included from Facet

#args, #scope_name

Instance Method Summary collapse

Methods included from Facet

included, #method_missing, #param, #scope

Methods included from Filter

included, #method_missing

Methods included from Query

included, #method_missing

Constructor Details

#initialize(field, *options) ⇒ Range

Returns a new instance of Range.



17
18
19
# File 'lib/eson/search/range.rb', line 17

def initialize(field, *options)
  self.field = QueryField.new(field, *options)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Eson::Search::Facet

Instance Attribute Details

#fieldObject

Returns the value of attribute field.



15
16
17
# File 'lib/eson/search/range.rb', line 15

def field
  @field
end

Instance Method Details

#to_query_hashObject



21
22
23
# File 'lib/eson/search/range.rb', line 21

def to_query_hash
  {name => field.to_query_hash}
end