Module: UnaryOperator
- Included in:
- NilOperator, NotOperator
- Defined in:
- lib/json_expr/operators/unary_operator.rb
Instance Method Summary collapse
Instance Method Details
#evaluate(evaluator, args) ⇒ Object
4 5 6 7 |
# File 'lib/json_expr/operators/unary_operator.rb', line 4 def evaluate(evaluator, args) arg = evaluator.evaluate(args) unary(evaluator, arg) end |
#unary(evaluator, arg) ⇒ Object
This method is abstract.
method
10 11 12 |
# File 'lib/json_expr/operators/unary_operator.rb', line 10 def unary(evaluator, arg) raise NotImplementedError.new("You must implement unnnary method.") end |