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.



44
45
46
# File 'lib/termular/parser.rb', line 44

def args
  @args
end

#calleeObject

Returns the value of attribute callee.



43
44
45
# File 'lib/termular/parser.rb', line 43

def callee
  @callee
end

Instance Method Details

#eval(ctx) ⇒ Object



45
46
47
# File 'lib/termular/parser.rb', line 45

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