Class: RandomDistribution::Sequence::RubyGlobalGenerator
- Defined in:
- lib/redshift/util/random.rb
Instance Attribute Summary collapse
-
#seed ⇒ Object
readonly
Returns the value of attribute seed.
Instance Method Summary collapse
-
#initialize(seed = nil) ⇒ RubyGlobalGenerator
constructor
A new instance of RubyGlobalGenerator.
- #next ⇒ Object
Constructor Details
#initialize(seed = nil) ⇒ RubyGlobalGenerator
Returns a new instance of RubyGlobalGenerator.
12 13 14 15 |
# File 'lib/redshift/util/random.rb', line 12 def initialize(seed = nil) @seed = seed srand(seed) if seed end |
Instance Attribute Details
#seed ⇒ Object (readonly)
Returns the value of attribute seed.
10 11 12 |
# File 'lib/redshift/util/random.rb', line 10 def seed @seed end |
Instance Method Details
#next ⇒ Object
16 17 18 |
# File 'lib/redshift/util/random.rb', line 16 def next rand end |