Class: Tataru::Instructions::CheckCreateInstruction
- Inherits:
-
CheckInstruction
- Object
- Tataru::Instruction
- ResourceInstruction
- CheckInstruction
- Tataru::Instructions::CheckCreateInstruction
- Defined in:
- lib/tataru/instructions/check_create_instruction.rb
Overview
instruction to check create
Instance Attribute Summary
Attributes inherited from Tataru::Instruction
Instance Method Summary collapse
- #after_complete ⇒ Object
-
#initialize ⇒ CheckCreateInstruction
constructor
A new instance of CheckCreateInstruction.
- #outputs ⇒ Object
Methods inherited from CheckInstruction
Methods inherited from ResourceInstruction
Methods inherited from Tataru::Instruction
Constructor Details
#initialize ⇒ CheckCreateInstruction
Returns a new instance of CheckCreateInstruction.
7 8 9 |
# File 'lib/tataru/instructions/check_create_instruction.rb', line 7 def initialize super :create end |
Instance Method Details
#after_complete ⇒ Object
11 12 13 |
# File 'lib/tataru/instructions/check_create_instruction.rb', line 11 def after_complete memory.hash[:outputs][resource_name] = outputs end |
#outputs ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/tataru/instructions/check_create_instruction.rb', line 15 def outputs return {} unless desc.output_fields.count resource_class = desc.resource_class resource = resource_class.new(memory.hash[:remote_ids][resource_name]) o = resource.outputs raise "Output for '#{resource_name}' is not a hash" unless o.is_a? Hash resource.outputs end |