Class: Groundhog
- Inherits:
-
Object
- Object
- Groundhog
- Defined in:
- lib/groundhog.rb
Overview
USAGE:
-
In a console, type Groundhog.day to start the loop.
-
Go nuts! There are literally no consequences to your actions.
-
Press ^D to end it all wake up in your comfy bed.
-
Quickly press ^D ^C to get out of Punxsutawney and back to your normal life.
Class Method Summary collapse
Class Method Details
.day ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/groundhog.rb', line 11 def self.day puts "\nOkay, campers, rise and shine, and don't forget your booties 'cause it's cooooold out there today!" puts "Usage: ctrl-D to reset transaction, ctrl-D ctrl-C (quickly) to get out of the loop" loop do puts "\n ♫ Then put your little hand in mine ♫" ActiveRecord::Base.transaction do binding.pry :quiet => true raise ActiveRecord::Rollback end puts " ** DAY ENDS **" sleep 0.5 end end |