Class: VarOperator
- Inherits:
-
Object
- Object
- VarOperator
- Includes:
- BinaryOperator
- Defined in:
- lib/json_expr/operators/var_operator.rb
Instance Method Summary collapse
Methods included from BinaryOperator
Instance Method Details
#evaluate(evaluator, path) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/json_expr/operators/var_operator.rb', line 8 def evaluate(evaluator, path) if path.is_a?(Hash) path = to_sym(path) path = path[:path] end path.is_a?(String) ? evaluator.extract_var(path) : nil end |