Class: Boolean

Inherits:
Object show all
Defined in:
lib/propr/random/boolean.rb

Class Method Summary collapse

Class Method Details

.random(m = Propr::Random) ⇒ Object



2
3
4
5
6
# File 'lib/propr/random/boolean.rb', line 2

def self.random(m = Propr::Random)
  m.bind(m.rand) do |n|
    m.unit(n > 0.5)
  end
end