Class: Integer

Inherits:
Object show all
Includes:
ExpMod
Defined in:
lib/choose.rb,
lib/exp_mod.rb

Overview

module ExpMod

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ExpMod

#exp

Class Method Details

.choose(limit = nil, generator = nil) ⇒ Object



11
12
13
# File 'lib/choose.rb', line 11

def self.choose ( limit=nil, generator=nil )
  limit.to_i.choose(generator)
end

Instance Method Details

#choose(generator = nil) ⇒ Object



15
16
17
# File 'lib/choose.rb', line 15

def choose ( generator=nil )
  (generator || RandomGenerators.default).choose_integer(self)
end