Class: Elasticband::Filter::Exists
- Inherits:
-
Elasticband::Filter
- Object
- Elasticband::Filter
- Elasticband::Filter::Exists
- Defined in:
- lib/elasticband/filter/exists.rb
Constant Summary
Constants inherited from Elasticband::Filter
Instance Attribute Summary collapse
-
#field ⇒ Object
Returns the value of attribute field.
Attributes inherited from Elasticband::Filter
Instance Method Summary collapse
-
#initialize(field) ⇒ Exists
constructor
A new instance of Exists.
- #to_h ⇒ Object
Methods inherited from Elasticband::Filter
Constructor Details
#initialize(field) ⇒ Exists
Returns a new instance of Exists.
6 7 8 |
# File 'lib/elasticband/filter/exists.rb', line 6 def initialize(field) self.field = field.to_sym end |
Instance Attribute Details
#field ⇒ Object
Returns the value of attribute field.
4 5 6 |
# File 'lib/elasticband/filter/exists.rb', line 4 def field @field end |
Instance Method Details
#to_h ⇒ Object
10 11 12 |
# File 'lib/elasticband/filter/exists.rb', line 10 def to_h { exists: { field: field } } end |