Class: Starter::Random::ConstantSequence

Inherits:
Sequence
  • Object
show all
Defined in:
lib/starter/random.rb

Instance Attribute Summary collapse

Attributes inherited from Sequence

#generator

Instance Method Summary collapse

Methods inherited from Sequence

random_pool_seed, random_seed, serial_count

Constructor Details

#initialize(opt = {}) ⇒ ConstantSequence

Returns a new instance of ConstantSequence.



90
91
92
# File 'lib/starter/random.rb', line 90

def initialize opt = {}
  @mean = Float(opt[:mean] || 0)
end

Instance Attribute Details

#meanObject (readonly)

Returns the value of attribute mean.



88
89
90
# File 'lib/starter/random.rb', line 88

def mean
  @mean
end

Instance Method Details

#nextObject



94
95
96
# File 'lib/starter/random.rb', line 94

def next
  @mean
end