Class: Geeklet
Instance Method Summary
collapse
#add_overrides, #command_parser, #configurableValue, #configurations, included, #isHelp?, #registerConfiguration
Instance Method Details
#description ⇒ Object
11
12
13
|
# File 'lib/geeklet.rb', line 11
def description
"No description specified for this geeklet."
end
|
#name ⇒ Object
7
8
9
|
# File 'lib/geeklet.rb', line 7
def name
self.class.to_s
end
|
#run(group, params) ⇒ Object
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/geeklet.rb', line 28
def run(group, params)
begin
add_overrides(group, params)
rescue => e
show_help(group)
Kernel.exit
end
true
end
|
#show_help(group) ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/geeklet.rb', line 15
def show_help(group)
parser = command_parser(group)
Kernel.puts(
<<-EOS
Geeklet: #{name}
Description: #{description}
EOS
)
parser.educate
end
|