Module: WaldorfAndStatler
- Defined in:
- lib/flicks/waldorf_and_statler.rb
Class Method Summary collapse
Class Method Details
.review(movie) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/flicks/waldorf_and_statler.rb', line 6 def self.review(movie) number_rolled = roll_die case number_rolled when 1..2 movie.thumbs_down puts "#{movie.title} got a thumbs down." when 3..4 puts "#{movie.title} was skipped." else movie.thumbs_up puts "#{movie.title} got a thumbs up!" end end |
.roll_die ⇒ Object
2 3 4 |
# File 'lib/flicks/waldorf_and_statler.rb', line 2 def self.roll_die rand(1..6) end |