Method: Kernel#maybe

Defined in:
lib/whynot.rb

#maybe(&block) ⇒ Object



8
9
10
11
12
# File 'lib/whynot.rb', line 8

def maybe(&block)
  if rand(2) == 1
    yield
  end
end