Class: Uberpass::CLI::HelpDecorator

Inherits:
Object
  • Object
show all
Defined in:
lib/uberpass/cli.rb

Instance Method Summary collapse

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

#outputObject



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