Class: FalseClass
Class Method Summary collapse
- .maybe? ⇒ Boolean
-
.random ⇒ Object
Yields true 50% of the time, otherwise yields false.
Class Method Details
.maybe? ⇒ Boolean
8 9 10 |
# File 'lib/more_ruby/falseclass.rb', line 8 def self.maybe? random end |
.random ⇒ Object
Yields true 50% of the time, otherwise yields false
4 5 6 |
# File 'lib/more_ruby/falseclass.rb', line 4 def self.random rand(2) % 2 == 0 end |