Class: Tlog::Command::Test
Instance Attribute Summary
#date_time_format, #seconds_format, #storage
Instance Method Summary
collapse
Instance Method Details
#execute(input, output) ⇒ Object
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/tlog/command/test.rb', line 8
def execute(input,output)
output.line("execute on test called")
if input.args[0].nil?
output.line("args at 0 was nil")
elsif input.args[1].nil?
arg1 = input.args.shift
output.line("arg at 0 was #{arg1}")
else
arg1 = input.args.shift
arg2 = input.args.shift
output.line("arg at 0 was #{arg1}")
output.line("arg at 1 was #{arg2}")
raise Tlog::Error::CommandInvalid, "Command invalid"
end
end
|
#name ⇒ Object
4
5
6
|
# File 'lib/tlog/command/test.rb', line 4
def name
"test"
end
|
#options(parser, options) ⇒ Object
24
25
26
|
# File 'lib/tlog/command/test.rb', line 24
def options(parser, options)
parser.banner = "usage: tlog test <project>"
end
|