Class: Termular::AST::Call

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

#argsObject

Returns the value of attribute args.



48
49
50
# File 'lib/termular/parser.rb', line 48

def args
  @args
end

#calleeObject

Returns the value of attribute callee.



47
48
49
# File 'lib/termular/parser.rb', line 47

def callee
  @callee
end

Instance Method Details

#eval(ctx) ⇒ Object



49
50
51
# File 'lib/termular/parser.rb', line 49

def eval(ctx)
  callee.eval(ctx).call *args.map { |a| a.eval(ctx) }
end