Class: Tataru::Instructions::UpdateInstruction

Inherits:
ResourceInstruction show all
Defined in:
lib/tataru/instructions/update_instruction.rb

Overview

update a resource

Instance Attribute Summary

Attributes inherited from Tataru::Instruction

#memory

Instance Method Summary collapse

Methods inherited from ResourceInstruction

#desc

Methods inherited from Tataru::Instruction

#execute, expects

Instance Method Details

#runObject



9
10
11
12
13
# File 'lib/tataru/instructions/update_instruction.rb', line 9

def run
  resource_class = desc.resource_class
  resource = resource_class.new(memory.hash[:remote_ids][resource_name])
  resource.update(properties)
end