Class: Uberpass::CLI::HelpDecorator
- Inherits:
-
Object
- Object
- Uberpass::CLI::HelpDecorator
- Defined in:
- lib/uberpass/cli.rb
Instance Method Summary collapse
-
#initialize(terminal, actions) ⇒ HelpDecorator
constructor
A new instance of HelpDecorator.
- #output ⇒ Object
Constructor Details
#initialize(terminal, actions) ⇒ HelpDecorator
Returns a new instance of HelpDecorator.
264 265 266 |
# File 'lib/uberpass/cli.rb', line 264 def initialize terminal, actions @terminal, @actions = terminal, actions end |
Instance Method Details
#output ⇒ Object
268 269 270 271 272 273 274 275 276 277 |
# File 'lib/uberpass/cli.rb', line 268 def output @actions.each do |action| next if action.name == 'help' @terminal.say "<%= color('\#{action.name} - \#{action.description}', BOLD) %> \nusage: \#{action.usage}\n\n" end end |