Class: NameRotateInstruction
- Inherits:
-
Instruction
- Object
- Instruction
- NameRotateInstruction
- Includes:
- RotateInstruction
- Defined in:
- lib/instructions/name/name_rotate.rb
Overview
pops the top 3 items of the :name
stack; pushes them back in rotated order
If they were A, B and C (with C originally at the top of the stack) the result will be B, C, A (with A at the top)
needs: 3 :name
pushes: 3 :name
Instance Attribute Summary
Attributes included from RotateInstruction
Attributes inherited from Instruction
Instance Method Summary collapse
-
#initialize(context) ⇒ NameRotateInstruction
constructor
A new instance of NameRotateInstruction.
Methods included from RotateInstruction
#cleanup, #derive, #preconditions?, #setup
Methods inherited from Instruction
all_instructions, #cleanup, #derive, #go, inherited, #needs, #preconditions?, #pushes, #setup, to_nudgecode
Constructor Details
#initialize(context) ⇒ NameRotateInstruction
Returns a new instance of NameRotateInstruction.
14 15 16 |
# File 'lib/instructions/name/name_rotate.rb', line 14 def initialize(context) super(context, :name) end |