Class: Arelastic::Queries::Nested
- Inherits:
-
Query
- Object
- Nodes::Node
- Query
- Arelastic::Queries::Nested
- Defined in:
- lib/arelastic/queries/nested.rb
Instance Attribute Summary collapse
-
#expr ⇒ Object
Returns the value of attribute expr.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
- #as_elastic ⇒ Object
-
#initialize(path, expr) ⇒ Nested
constructor
A new instance of Nested.
Methods inherited from Query
Methods inherited from Nodes::Node
#==, #convert_to_elastic, #read_option!
Methods included from Arities::Binary
Methods included from Arities::Polyadic
Methods included from Arities::Unary
Constructor Details
#initialize(path, expr) ⇒ Nested
Returns a new instance of Nested.
6 7 8 9 |
# File 'lib/arelastic/queries/nested.rb', line 6 def initialize(path, expr) @path = path @expr = expr end |
Instance Attribute Details
#expr ⇒ Object
Returns the value of attribute expr.
4 5 6 |
# File 'lib/arelastic/queries/nested.rb', line 4 def expr @expr end |
#path ⇒ Object
Returns the value of attribute path.
4 5 6 |
# File 'lib/arelastic/queries/nested.rb', line 4 def path @path end |
Instance Method Details
#as_elastic ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/arelastic/queries/nested.rb', line 11 def as_elastic params = { 'path' => path, 'query' => convert_to_elastic(expr) } { 'nested' => params } end |