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