Class: Elasticband::Query::Filtered
- Inherits:
-
Elasticband::Query
- Object
- Elasticband::Query
- Elasticband::Query::Filtered
- Defined in:
- lib/elasticband/query/filtered.rb
Instance Attribute Summary collapse
-
#filter ⇒ Object
Returns the value of attribute filter.
-
#options ⇒ Object
Returns the value of attribute options.
-
#query ⇒ Object
Returns the value of attribute query.
Instance Method Summary collapse
-
#initialize(filter, query = nil, options = {}) ⇒ Filtered
constructor
A new instance of Filtered.
- #to_h ⇒ Object
Methods inherited from Elasticband::Query
Constructor Details
#initialize(filter, query = nil, options = {}) ⇒ Filtered
Returns a new instance of Filtered.
6 7 8 9 10 |
# File 'lib/elasticband/query/filtered.rb', line 6 def initialize(filter, query = nil, = {}) self.filter = filter self.query = query self. = end |
Instance Attribute Details
#filter ⇒ Object
Returns the value of attribute filter.
4 5 6 |
# File 'lib/elasticband/query/filtered.rb', line 4 def filter @filter end |
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/elasticband/query/filtered.rb', line 4 def @options end |
#query ⇒ Object
Returns the value of attribute query.
4 5 6 |
# File 'lib/elasticband/query/filtered.rb', line 4 def query @query end |
Instance Method Details
#to_h ⇒ Object
12 13 14 |
# File 'lib/elasticband/query/filtered.rb', line 12 def to_h { filtered: query_hash } end |