Class: Tlog::Command::Delete

Inherits:
Tlog::Command show all
Defined in:
lib/tlog/command/delete.rb

Instance Attribute Summary

Attributes inherited from Tlog::Command

#date_time_format, #seconds_format, #storage

Instance Method Summary collapse

Instance Method Details

#execute(input, output) ⇒ Object



7
8
9
# File 'lib/tlog/command/delete.rb', line 7

def execute(input, output)
	raise Tlog::Error::CommandInvalid, "Task does not exist" unless delete(input.args[0])
end

#nameObject



3
4
5
# File 'lib/tlog/command/delete.rb', line 3

def name
	"delete"
end

#options(parser, options) ⇒ Object



11
12
13
# File 'lib/tlog/command/delete.rb', line 11

def options(parser, options)
	parser.banner = "usage: tlog delete <tlog_name>"
end