Class: JMESPath::Nodes::Expression Private
- Defined in:
- lib/jmespath/nodes/expression.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 Attribute Summary collapse
- #expression ⇒ Object readonly private
Instance Method Summary collapse
- #eval(value) ⇒ Object private
-
#initialize(expression) ⇒ Expression
constructor
private
A new instance of Expression.
- #optimize ⇒ Object private
- #visit(_value) ⇒ Object private
Methods inherited from Node
Constructor Details
#initialize(expression) ⇒ Expression
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 Expression.
8 9 10 |
# File 'lib/jmespath/nodes/expression.rb', line 8 def initialize(expression) @expression = expression end |
Instance Attribute Details
#expression ⇒ Object (readonly)
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.
6 7 8 |
# File 'lib/jmespath/nodes/expression.rb', line 6 def expression @expression end |
Instance Method Details
#eval(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.
16 17 18 |
# File 'lib/jmespath/nodes/expression.rb', line 16 def eval(value) @expression.visit(value) end |
#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.
20 21 22 |
# File 'lib/jmespath/nodes/expression.rb', line 20 def optimize self.class.new(@expression.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.
12 13 14 |
# File 'lib/jmespath/nodes/expression.rb', line 12 def visit(_value) self end |