Class: ElasticsearchQuery::Filter

Inherits:
Object
  • Object
show all
Defined in:
lib/elasticsearch_query/filter.rb

Instance Method Summary collapse

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_hashObject



8
9
10
# File 'lib/elasticsearch_query/filter.rb', line 8

def to_hash
  formatter_class.new( @name, @value ).to_hash
end