10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/cloudrail_si/servicecode/commands/CallFunc.rb', line 10
def execute(environment, parameters)
Helper.assert((parameters.length >= 1) &&
((Helper.is_string(parameters[0])) || Helper.is_var_address(parameters[0])))
function_name = Helper.resolve(environment, parameters[0], true)
function_name = function_name.to_s if (!Helper.is_string(function_name))
function_parameters = []
(1..parameters.length - 1).each do |i|
function_parameters.push(Helper.resolve(environment, parameters[i], false))
end
environment.call_function(function_name, function_parameters)
end
|