Class: CloudRailSi::ServiceCode::Delete

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

Instance Method Summary collapse

Instance Method Details

#execute(environment, parameters) ⇒ Object



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

def execute(environment, parameters)
    Helper.assert(parameters.length >= 1 && Helper.is_var_address(parameters[0]))
    target_id = parameters[0]
    target_id_parts = environment.decode_variable_address(target_id)
    (1..parameters.length - 1).each do |i|
        target_id_parts.push(Helper.resolve(environment, parameters[i]))
    end
    environment.delete_variable(target_id_parts)
end

#get_identifierObject



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

def get_identifier
    'delete'
end