Class: Tlog::Command::Init
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
23
24
25
26
|
# File 'lib/tlog/command/init.rb', line 8
def execute(input,output)
if input.args[0].nil?
raise Tlog::Error::CommandInvalid, "Project already initialized" unless @storage.init_project
else
raise Tlog::Error::CommandInvalid, "Command invalid"
end
end
|
#name ⇒ Object
4
5
6
|
# File 'lib/tlog/command/init.rb', line 4
def name
"init"
end
|
#options(parser, options) ⇒ Object
28
29
30
|
# File 'lib/tlog/command/init.rb', line 28
def options(parser, options)
parser.banner = "usage: tlog init"
end
|