Class: ExecSInstruction
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
#cleanup ⇒ Object
13
14
15
16
17
|
# File 'lib/instructions/exec/exec_s.rb', line 13
def cleanup
pushes :exec, @s_result
pushes :exec, @argC
pushes :exec, @argA
end
|
#derive ⇒ Object
10
11
12
|
# File 'lib/instructions/exec/exec_s.rb', line 10
def derive
@s_result = CodeblockPoint.new([@argB,@argC])
end
|
#preconditions? ⇒ Boolean
2
3
4
|
# File 'lib/instructions/exec/exec_s.rb', line 2
def preconditions?
needs :exec, 3
end
|
#setup ⇒ Object
5
6
7
8
9
|
# File 'lib/instructions/exec/exec_s.rb', line 5
def setup
@argA = @context.pop(:exec)
@argB = @context.pop(:exec)
@argC = @context.pop(:exec)
end
|