Class: Prometheus::Base
- Inherits:
-
Thor
- Object
- Thor
- Prometheus::Base
show all
- Extended by:
- PluginDSL
- Defined in:
- lib/prometheus/base.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from PluginDSL
configurable, full_name, readme, start
Class Method Details
.banner(task, namespace = true, subcommand = false) ⇒ Object
12
13
14
|
# File 'lib/prometheus/base.rb', line 12
def banner(task, namespace = true, subcommand = false)
"#{task.formatted_usage(self, false, subcommand)}"
end
|
.repl_banner ⇒ Object
8
9
10
|
# File 'lib/prometheus/base.rb', line 8
def repl_banner
"\e[34m#{self.full_name} \e[0m- Interactive mode, try 'exit' or 'help' for usage"
end
|
Instance Method Details
#help(task = nil, subcommand = false) ⇒ Object
26
27
28
29
30
31
|
# File 'lib/prometheus/base.rb', line 26
def help(task = nil, subcommand = false)
unless task && subcommand
say self.class.readme, :green
end
super(task, subcommand)
end
|
#repl ⇒ Object
18
19
20
21
22
|
# File 'lib/prometheus/base.rb', line 18
def repl
$interactive = true
Repl.start self
$interactive = false
end
|