Class: Luoma::PosExpression
- Inherits:
-
PrefixExpression
- Object
- Expression
- PrefixExpression
- Luoma::PosExpression
- Defined in:
- lib/luoma/expression.rb,
sig/luoma/expression.rbs
Instance Attribute Summary
Attributes inherited from Expression
Instance Method Summary collapse
Methods inherited from PrefixExpression
Methods inherited from Expression
#children, #initialize, #scope
Constructor Details
This class inherits a constructor from Luoma::PrefixExpression
Instance Method Details
#evaluate(context) ⇒ Object
375 376 377 |
# File 'lib/luoma/expression.rb', line 375 def evaluate(context) context.env.to_numeric(@right.evaluate(context), context, default: :nothing) end |
#to_s ⇒ Object
380 381 382 |
# File 'lib/luoma/expression.rb', line 380 def to_s "+#{@right}" end |