Class: ExecYInstruction

Inherits:
Instruction show all
Defined in:
lib/instructions/exec/exec_y.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



29
30
31
32
# File 'lib/instructions/exec/exec_y.rb', line 29

def cleanup
  pushes :exec, @recurser
  pushes :exec, @arg1
end

#deriveObject



26
27
28
# File 'lib/instructions/exec/exec_y.rb', line 26

def derive
  @recurser = CodeblockPoint.new([InstructionPoint.new("exec_y"),@arg1])
end

#preconditions?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/instructions/exec/exec_y.rb', line 20

def preconditions?
  needs :exec, 1
end

#setupObject



23
24
25
# File 'lib/instructions/exec/exec_y.rb', line 23

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