10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/cloudrail_si/servicecode/commands/Set.rb', line 10
def execute(environment, parameters)
Helper.assert(parameters.length >= 2 &&
Helper.is_var_address(parameters[0]))
target_var = parameters[0]
value = Helper.resolve(environment, parameters[1])
target_var_parts = environment.decode_variable_address(target_var)
(2..parameters.length - 1).each do |i|
target_var_parts.push(Helper.resolve(environment, parameters[i]))
end
environment.set_variable(target_var_parts, value)
end
|