Class: JMESPath::Nodes::Subexpression Private
- Defined in:
- lib/jmespath/nodes/subexpression.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#initialize(left, right) ⇒ Subexpression
constructor
private
A new instance of Subexpression.
- #optimize ⇒ Object private
- #visit(value) ⇒ Object private
Methods inherited from Node
Constructor Details
#initialize(left, right) ⇒ Subexpression
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Subexpression.
6 7 8 9 |
# File 'lib/jmespath/nodes/subexpression.rb', line 6 def initialize(left, right) @left = left @right = right end |
Instance Method Details
#optimize ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
15 16 17 |
# File 'lib/jmespath/nodes/subexpression.rb', line 15 def optimize Chain.new(flatten).optimize end |
#visit(value) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 |
# File 'lib/jmespath/nodes/subexpression.rb', line 11 def visit(value) @right.visit(@left.visit(value)) end |