Class: Tataru::Instructions::ValueInstruction
- Inherits:
-
ImmediateModeInstruction
- Object
- Tataru::Instruction
- ImmediateModeInstruction
- Tataru::Instructions::ValueInstruction
- Defined in:
- lib/tataru/instructions/value_instruction.rb
Overview
sets a hash entry based on whatever key was set
Instance Attribute Summary
Attributes inherited from Tataru::Instruction
Instance Method Summary collapse
Methods inherited from ImmediateModeInstruction
Methods inherited from Tataru::Instruction
Constructor Details
This class inherits a constructor from Tataru::Instructions::ImmediateModeInstruction
Instance Method Details
#run ⇒ Object
7 8 9 10 11 12 |
# File 'lib/tataru/instructions/value_instruction.rb', line 7 def run return memory.error = 'No key set' unless memory.hash[:temp].key? :_key key = memory.hash[:temp].delete :_key memory.hash[:temp][key] = @param end |