Class: Luoma::NotExpression
- Inherits:
-
PrefixExpression
- Object
- Expression
- PrefixExpression
- Luoma::NotExpression
- 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
364 365 366 |
# File 'lib/luoma/expression.rb', line 364 def evaluate(context) !context.env.truthy?(@right.evaluate(context), context) end |
#to_s ⇒ Object
369 370 371 |
# File 'lib/luoma/expression.rb', line 369 def to_s "not #{@right}" end |