Class: NameUnbindInstruction

Inherits:
Instruction show all
Defined in:
lib/instructions/name/name_unbind.rb

Instance Attribute Summary

Attributes inherited from Instruction

#context

Instance Method Summary collapse

Methods inherited from Instruction

all_instructions, #go, inherited, #initialize, #needs, #pushes, to_nudgecode

Constructor Details

This class inherits a constructor from Instruction

Instance Method Details

#cleanupObject



14
15
16
# File 'lib/instructions/name/name_unbind.rb', line 14

def cleanup
  @context.unbind_name(@lost_name)
end

#deriveObject



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

def derive
  @lost_name = @arg1.name
end

#preconditions?Boolean

Returns:

  • (Boolean)


2
3
4
# File 'lib/instructions/name/name_unbind.rb', line 2

def preconditions?
  needs :name,1
end

#setupObject



6
7
8
# File 'lib/instructions/name/name_unbind.rb', line 6

def setup
  @arg1 = @context.pop(:name)
end