Class: Timelog::Command::Resume

Inherits:
Timelog::Command show all
Defined in:
lib/timelog/command/resume.rb

Instance Attribute Summary

Attributes inherited from Timelog::Command

#arguments, #book, #session

Instance Method Summary collapse

Methods inherited from Timelog::Command

get, inherited, #initialize, known, register, #time_in_arguments

Constructor Details

This class inherits a constructor from Timelog::Command

Instance Method Details

#executeObject



4
5
6
7
8
# File 'lib/timelog/command/resume.rb', line 4

def execute
  entry = book.entries.active_or_new
  book.entries.resume entry, at: time_in_arguments
  "entry resumed"
end

#helpObject



10
11
12
# File 'lib/timelog/command/resume.rb', line 10

def help
  "usage: timelog resume [<time>]"
end