Class: NameDuplicateInstruction

Inherits:
Instruction show all
Includes:
DuplicateInstruction
Defined in:
lib/instructions/name/name_duplicate.rb

Overview

makes and pushes a clone of the top item on the :name stack

needs: 1 :name

pushes: 1 :name

Instance Attribute Summary

Attributes included from DuplicateInstruction

#target_stack

Attributes inherited from Instruction

#context

Instance Method Summary collapse

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) ⇒ NameDuplicateInstruction

Returns a new instance of NameDuplicateInstruction.



10
11
12
# File 'lib/instructions/name/name_duplicate.rb', line 10

def initialize(context)
  super(context, :name)
end