Class: ElasticsearchQuery::Filter
- Inherits:
-
Object
- Object
- ElasticsearchQuery::Filter
- Defined in:
- lib/elasticsearch_query/filter.rb
Instance Method Summary collapse
-
#initialize(name, value) ⇒ Filter
constructor
A new instance of Filter.
- #to_hash ⇒ Object
Constructor Details
#initialize(name, value) ⇒ Filter
Returns a new instance of Filter.
3 4 5 6 |
# File 'lib/elasticsearch_query/filter.rb', line 3 def initialize( name, value ) @name = name @value = value end |
Instance Method Details
#to_hash ⇒ Object
8 9 10 |
# File 'lib/elasticsearch_query/filter.rb', line 8 def to_hash formatter_class.new( @name, @value ).to_hash end |