Class: BoolRotateInstruction
- Inherits:
-
Instruction
- Object
- Instruction
- BoolRotateInstruction
- Includes:
- RotateInstruction
- Defined in:
- lib/instructions/bool/bool_rotate.rb
Overview
pops the top 3 items of the :bool
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 :bool
pushes: 3 :bool
Instance Attribute Summary
Attributes included from RotateInstruction
Attributes inherited from Instruction
Instance Method Summary collapse
-
#initialize(context) ⇒ BoolRotateInstruction
constructor
A new instance of BoolRotateInstruction.
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) ⇒ BoolRotateInstruction
Returns a new instance of BoolRotateInstruction.
14 15 16 |
# File 'lib/instructions/bool/bool_rotate.rb', line 14 def initialize(context) super(context, :bool) end |