class FalseClass
Public Class Methods
maybe?()
click to toggle source
# File lib/more_ruby/falseclass.rb, line 8 def self.maybe? random end
random()
click to toggle source
Yields true 50% of the time, otherwise yields false
# File lib/more_ruby/falseclass.rb, line 4 def self.random rand(2) % 2 == 0 end