Class: BoolDuplicateInstruction
- Inherits:
-
Instruction
- Object
- Instruction
- BoolDuplicateInstruction
- Includes:
- DuplicateInstruction
- Defined in:
- lib/instructions/bool/bool_duplicate.rb
Overview
makes and pushes a clone of the top item on the :bool
stack
needs: 1 :bool
pushes: 1 :bool
Instance Attribute Summary
Attributes included from DuplicateInstruction
Attributes inherited from Instruction
Instance Method Summary collapse
-
#initialize(context) ⇒ BoolDuplicateInstruction
constructor
A new instance of BoolDuplicateInstruction.
Methods included from DuplicateInstruction
#cleanup, #derive, #preconditions?, #setup
Methods inherited from Instruction
all_instructions, #cleanup, #derive, #go, inherited, #needs, #preconditions?, #pushes, #setup, to_nudgecode
Constructor Details
#initialize(context) ⇒ BoolDuplicateInstruction
Returns a new instance of BoolDuplicateInstruction.
10 11 12 |
# File 'lib/instructions/bool/bool_duplicate.rb', line 10 def initialize(context) super(context, :bool) end |