Class: FloatRandomInstruction

Inherits:
Instruction show all
Defined in:
lib/instructions/float/float_random.rb

Overview

pushes a new :float ValuePoint, with value determined by a call to FloatType.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

#cleanupObject



13
14
15
# File 'lib/instructions/float/float_random.rb', line 13

def cleanup
  pushes :float, @result
end

#deriveObject



10
11
12
# File 'lib/instructions/float/float_random.rb', line 10

def derive
  @result = ValuePoint.new("float", FloatType.any_value)
end

#preconditions?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/instructions/float/float_random.rb', line 5

def preconditions?
  true # no preconditions
end

#setupObject



8
9
# File 'lib/instructions/float/float_random.rb', line 8

def setup
end