Module: Arithmetic::Operators
Constant Summary collapse
- UNARY_MINUS =
Operator.new("-", 2, lambda {|x| -x})
- MINUS =
Operator.new("-", 0, lambda {|x, y| x - y})
Instance Method Summary collapse
Instance Method Details
#get(token) ⇒ Object
37 38 39 |
# File 'lib/arithmetic/operators.rb', line 37 def get(token) @operators[token] end |