Class: Starter::Random::Sequence::RubyGlobalGenerator

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

Instance Method Summary collapse

Constructor Details

#initialize(seed = nil) ⇒ RubyGlobalGenerator

Returns a new instance of RubyGlobalGenerator.



21
22
23
# File 'lib/starter/random.rb', line 21

def initialize(seed = nil)
  srand(seed) if seed
end

Instance Method Details

#nextObject



24
25
26
# File 'lib/starter/random.rb', line 24

def next
  rand
end