Class: CloudRailSi::ServiceCode::Concat

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudrail_si/servicecode/commands/Concat.rb

Instance Method Summary collapse

Instance Method Details

#execute(environment, parameters) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/cloudrail_si/servicecode/commands/Concat.rb', line 10

def execute(environment, parameters)
    Helper.assert(parameters.length >= 2 && Helper.is_var_address(parameters[0]))
    result_var = parameters[0]
    str = ""
    (1..parameters.length).each do |i|
        str_part = Helper.resolve(environment, parameters[i])
        str += str_part.to_s
    end
    environment.set_variable(result_var, str)
end

#get_identifierObject



6
7
8
# File 'lib/cloudrail_si/servicecode/commands/Concat.rb', line 6

def get_identifier
    'string.concat'
end