Class: PlanOut::RandomInteger
- Defined in:
- lib/plan_out/op_random.rb
Constant Summary
Constants inherited from OpRandom
Instance Attribute Summary
Attributes inherited from Operator
Instance Method Summary collapse
Methods inherited from OpRandom
#get_hash, #get_uniform, #get_unit
Methods inherited from OpSimple
Methods inherited from Operator
Constructor Details
This class inherits a constructor from PlanOut::Operator
Instance Method Details
#simple_execute ⇒ Object
38 39 40 41 42 |
# File 'lib/plan_out/op_random.rb', line 38 def simple_execute min_val = @parameters.fetch(:min, 0) max_val = @parameters.fetch(:max, 1) min_val + get_hash() % (max_val - min_val + 1) end |