Class: Tlog::Command::Stop

Inherits:
Tlog::Command show all
Defined in:
lib/tlog/command/stop.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
10
# File 'lib/tlog/command/stop.rb', line 7

def execute(input, output)
	raise Tlog::Error::CommandInvalid, "Must specify log name" unless input.args[0]
	stop(input.args[0])
end

#nameObject



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

def name 
	"stop"
end

#options(parser, options) ⇒ Object



12
13
14
# File 'lib/tlog/command/stop.rb', line 12

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