diff options
| author | Zack Hobson | 2014-01-26 10:07:28 -0800 | 
|---|---|---|
| committer | Zack Hobson | 2014-01-26 10:11:32 -0800 | 
| commit | 300ff2b3e1ccd190f361f47ef2eb640d7e141073 (patch) | |
| tree | 79590120cf1b1689a0572e0d68be2a9a06008806 /lib | |
| parent | d95054ddf4fd4d2152d213d7a1391831f9540d0b (diff) | |
| download | hcl-300ff2b3e1ccd190f361f47ef2eb640d7e141073.tar.bz2 | |
confirm timer cancel, closes #47
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/hcl/commands.rb | 3 | 
1 files changed, 3 insertions, 0 deletions
| diff --git a/lib/hcl/commands.rb b/lib/hcl/commands.rb index c753fbf..9bad615 100644 --- a/lib/hcl/commands.rb +++ b/lib/hcl/commands.rb @@ -45,6 +45,9 @@ module HCl      def cancel        entry = DayEntry.with_timer(http) || DayEntry.last(http)        if entry +        confirmed = /^y/.match(ask("#{entry}\nDelete this entry? (y/n): ").downcase) +        return unless confirmed +          if entry.cancel http            "Deleted entry #{entry}."          else | 
