Module: Pritch
- Defined in:
- lib/pritch.rb,
lib/pritch/persistence.rb
Defined Under Namespace
Classes: Persistence
Class Method Summary collapse
Class Method Details
.leave ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/pritch.rb', line 6 def self.leave puts "What did you just do?".yellow print " > ".blue did = gets puts puts "What's the next thing to do?".yellow print " > ".blue todo = gets Pritch::Persistence.save(did, todo) end |
.re ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/pritch.rb', line 19 def self.re begin did, todo = Pritch::Persistence.load rescue NoDataException => e puts "No information available. You should use #{'`leave`'.light_white} the next time you stop working on that project." puts exit end puts "What you did before you left:".yellow puts puts " #{did}".light_white puts puts "Next thing you should do:".yellow puts puts " #{todo}".light_white puts end |