Class: Termular::AST::Negate

Inherits:
Base
  • Object
show all
Defined in:
lib/termular/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Termular::AST::Base

Instance Attribute Details

#expressionObject

Returns the value of attribute expression.



26
27
28
# File 'lib/termular/parser.rb', line 26

def expression
  @expression
end

Instance Method Details

#eval(ctx) ⇒ Object



27
28
29
# File 'lib/termular/parser.rb', line 27

def eval(ctx)
  -expression.eval(ctx)
end