Class: Tataru::Instructions::InitInstruction
- Inherits:
-
Tataru::Instruction
- Object
- Tataru::Instruction
- Tataru::Instructions::InitInstruction
- Defined in:
- lib/tataru/instructions/init_instruction.rb
Overview
instruction to initialize the memory
Instance Attribute Summary collapse
-
#deleted ⇒ Object
Returns the value of attribute deleted.
-
#labels ⇒ Object
Returns the value of attribute labels.
-
#outputs ⇒ Object
Returns the value of attribute outputs.
-
#remote_ids ⇒ Object
Returns the value of attribute remote_ids.
-
#rom ⇒ Object
Returns the value of attribute rom.
Attributes inherited from Tataru::Instruction
Instance Method Summary collapse
-
#initialize ⇒ InitInstruction
constructor
A new instance of InitInstruction.
- #run ⇒ Object
Methods inherited from Tataru::Instruction
Constructor Details
#initialize ⇒ InitInstruction
Returns a new instance of InitInstruction.
9 10 11 12 13 14 15 |
# File 'lib/tataru/instructions/init_instruction.rb', line 9 def initialize @remote_ids = {} @outputs = {} @rom = {} @labels = {} @deleted = [] end |
Instance Attribute Details
#deleted ⇒ Object
Returns the value of attribute deleted.
7 8 9 |
# File 'lib/tataru/instructions/init_instruction.rb', line 7 def deleted @deleted end |
#labels ⇒ Object
Returns the value of attribute labels.
7 8 9 |
# File 'lib/tataru/instructions/init_instruction.rb', line 7 def labels @labels end |
#outputs ⇒ Object
Returns the value of attribute outputs.
7 8 9 |
# File 'lib/tataru/instructions/init_instruction.rb', line 7 def outputs @outputs end |
#remote_ids ⇒ Object
Returns the value of attribute remote_ids.
7 8 9 |
# File 'lib/tataru/instructions/init_instruction.rb', line 7 def remote_ids @remote_ids end |
#rom ⇒ Object
Returns the value of attribute rom.
7 8 9 |
# File 'lib/tataru/instructions/init_instruction.rb', line 7 def rom @rom end |
Instance Method Details
#run ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/tataru/instructions/init_instruction.rb', line 17 def run memory.hash[:remote_ids] = @remote_ids memory.hash[:outputs] = @outputs memory.hash[:labels] = @labels memory.hash[:rom] = @rom.freeze memory.hash[:deleted] = @deleted memory.hash[:update_action] = {} end |