Class: Arelastic::Queries::Bool
- Inherits:
-
Query
- Object
- Nodes::Node
- Query
- Arelastic::Queries::Bool
- Defined in:
- lib/arelastic/queries/bool.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #as_elastic ⇒ Object
-
#initialize(options) ⇒ Bool
constructor
A new instance of Bool.
Methods inherited from Query
Methods inherited from Nodes::Node
Methods included from Arities::Binary
Methods included from Arities::Polyadic
Methods included from Arities::Unary
Constructor Details
#initialize(options) ⇒ Bool
Returns a new instance of Bool.
5 6 7 |
# File 'lib/arelastic/queries/bool.rb', line 5 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/arelastic/queries/bool.rb', line 4 def @options end |
Instance Method Details
#as_elastic ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/arelastic/queries/bool.rb', line 9 def as_elastic params = {} .each do |key, value| params[key] = convert_to_elastic(value) end { "bool" => params } end |