Class: Alexckrandomizer::Coin

Inherits:
Object
  • Object
show all
Defined in:
lib/alexckrandomizer.rb

Instance Method Summary collapse

Instance Method Details

#flipObject



9
10
11
12
13
14
15
16
# File 'lib/alexckrandomizer.rb', line 9

def flip
  number = rand(1..2)
  if number == 1
    return "heads"
  else
    return "tails"
  end
end