Class: Elasticquery::Filters::Terms
- Defined in:
- lib/elasticquery/filters/terms.rb
Constant Summary collapse
- OPTIONS =
%i(_cache execution)
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Terms
constructor
A new instance of Terms.
- #to_hash ⇒ Object
- #valid? ⇒ Boolean
Methods inherited from Base
#dup_with, #invalid?, #to_not_hash
Constructor Details
Instance Method Details
#to_hash ⇒ Object
18 19 20 |
# File 'lib/elasticquery/filters/terms.rb', line 18 def to_hash {terms: @conditions.merge(@options)} end |
#valid? ⇒ Boolean
14 15 16 |
# File 'lib/elasticquery/filters/terms.rb', line 14 def valid? @conditions.keys.any? end |