Class: Tlog::Command::Delete
Instance Attribute Summary
#date_time_format, #seconds_format, #storage
Instance Method Summary
collapse
Instance Method Details
#description ⇒ Object
7
8
9
|
# File 'lib/tlog/command/delete.rb', line 7
def description
"deletes a time log"
end
|
#execute(input, output) ⇒ Object
11
12
13
14
|
# File 'lib/tlog/command/delete.rb', line 11
def execute(input, output)
raise Tlog::Error::CommandInvalid, "Task does not exist" unless delete(input.args[0])
output.line("Deleted log '#{input.args[0]}'")
end
|
#name ⇒ Object
3
4
5
|
# File 'lib/tlog/command/delete.rb', line 3
def name
"delete"
end
|
#options(parser, options) ⇒ Object
16
17
18
|
# File 'lib/tlog/command/delete.rb', line 16
def options(parser, options)
parser.banner = "usage: tlog delete <tlog_name>"
end
|