Class: Tlog::Command::Display
Instance Attribute Summary
#date_time_format, #seconds_format, #storage
Instance Method Summary
collapse
Instance Method Details
#execute(input, output) ⇒ Object
8
9
10
|
# File 'lib/tlog/command/display.rb', line 8
def execute(input, output)
raise Tlog::Error::CommandInvalid, "Logging invalid" unless display(input.args[0], input.options[:length], output)
end
|
#name ⇒ Object
4
5
6
|
# File 'lib/tlog/command/display.rb', line 4
def name
"display"
end
|
#options(parser, options) ⇒ Object
12
13
14
15
16
17
18
|
# File 'lib/tlog/command/display.rb', line 12
def options(parser, options)
parser.banner = "usage: tlog log <log_name>"
parser.on("-l", "--length <length_threshold>") do |length|
options[:length] = length
end
end
|