class Tataru::Instructions::ReadInstruction
read properties of resource
Public Instance Methods
fields()
click to toggle source
# File lib/tataru/instructions/read_instruction.rb, line 23 def fields @fields ||= desc.immutable_fields + desc.mutable_fields end
resource()
click to toggle source
# File lib/tataru/instructions/read_instruction.rb, line 19 def resource resource_class.new(memory.hash[:remote_ids][resource_name]) end
resource_class()
click to toggle source
# File lib/tataru/instructions/read_instruction.rb, line 15 def resource_class desc.resource_class end
run()
click to toggle source
# File lib/tataru/instructions/read_instruction.rb, line 7 def run results = resource.read(fields) memory.hash[:temp][resource_name] = {} fields.each do |k| memory.hash[:temp][resource_name][k] = results[k] end end