Class: IntRandomInstruction
Overview
pushes a new :int
ValuePoint, with value determined by a call to IntType.any_value
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
|
# File 'lib/instructions/int/int_random.rb', line 13
def cleanup
pushes :int, @result
end
|
#derive ⇒ Object
10
11
12
|
# File 'lib/instructions/int/int_random.rb', line 10
def derive
@result = ValuePoint.new("int", IntType.any_value)
end
|
#preconditions? ⇒ Boolean
5
6
7
|
# File 'lib/instructions/int/int_random.rb', line 5
def preconditions?
true end
|
#setup ⇒ Object
8
9
|
# File 'lib/instructions/int/int_random.rb', line 8
def setup
end
|