Class: Tlog::Command::Start
Instance Attribute Summary
#date_time_format, #seconds_format, #storage
Instance Method Summary
collapse
Instance Method Details
#description ⇒ Object
8
9
10
|
# File 'lib/tlog/command/start.rb', line 8
def description
"starts a new task for a time log"
end
|
#execute(input, output) ⇒ Object
12
13
14
15
|
# File 'lib/tlog/command/start.rb', line 12
def execute(input, output)
updated_log = start(input.options[:description])
output.line("Started '#{updated_log.name}'")
end
|
#name ⇒ Object
4
5
6
|
# File 'lib/tlog/command/start.rb', line 4
def name
"start"
end
|
#options(parser, options) ⇒ Object
17
18
19
20
21
22
23
|
# File 'lib/tlog/command/start.rb', line 17
def options(parser, options)
parser.banner = "usage: tlog start"
parser.on("-d", "--description <description>") do |description|
options[:description] = description
end
end
|