Class: CoinFlip::CLI
- Inherits:
-
Object
- Object
- CoinFlip::CLI
- Defined in:
- lib/coin_flip/cli.rb
Class Method Summary collapse
-
.flip ⇒ Object
def self.all @@all end.
Class Method Details
.flip ⇒ Object
def self.all
@@all
end
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/coin_flip/cli.rb', line 13 def self.flip random = [0, 1].sample toss = "" if random == 0 toss = "Heads" else toss = "Tails" end # -- extra code for later use -- # self.all << toss return toss end |