Class: IntSwapInstruction
- Inherits:
-
Instruction
- Object
- Instruction
- IntSwapInstruction
- Includes:
- SwapInstruction
- Defined in:
- lib/instructions/int/int_swap.rb
Overview
exchanges the position of the top 2 items on the :int
stack
Instance Attribute Summary
Attributes included from SwapInstruction
Attributes inherited from Instruction
Instance Method Summary collapse
-
#initialize(context) ⇒ IntSwapInstruction
constructor
A new instance of IntSwapInstruction.
Methods included from SwapInstruction
#cleanup, #derive, #preconditions?, #setup
Methods inherited from Instruction
all_instructions, #cleanup, #derive, #go, inherited, #needs, #preconditions?, #pushes, #setup, to_nudgecode
Constructor Details
#initialize(context) ⇒ IntSwapInstruction
Returns a new instance of IntSwapInstruction.
6 7 8 |
# File 'lib/instructions/int/int_swap.rb', line 6 def initialize(context) super(context, :int) end |