Module: Charty::Plotters::RandomSupport
- Included in:
- EstimationSupport, LinePlotter
- Defined in:
- lib/charty/plotters/random_support.rb
Instance Attribute Summary collapse
-
#random ⇒ Object
Returns the value of attribute random.
Class Method Summary collapse
Instance Attribute Details
#random ⇒ Object
Returns the value of attribute random.
4 5 6 |
# File 'lib/charty/plotters/random_support.rb', line 4 def random @random end |
Class Method Details
.check_random(random) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/charty/plotters/random_support.rb', line 10 module_function def check_random(random) case random when nil Random.new when Integer Random.new(random) when Random random else raise ArgumentError, "invalid value for random (%p for a generator or a seed value)" % value end end |