Class: MCollective::Application::Help

Inherits:
Application
  • Object
show all
Defined in:
lib/mcollective/application/help.rb

Overview

rubocop:disable Style/ClassAndModuleChildren

Instance Method Summary collapse

Instance Method Details

#mainObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/mcollective/application/help.rb', line 10

def main
  if configuration.include?(:application)
    puts Applications[configuration[:application]].help
  else
    puts "The Marionette Collective version #{MCollective.version}"
    puts

    Applications.list.sort.each do |app|
      begin
        puts "  %-15s %s" % [app, Applications[app].application_description]
      rescue # rubocop:disable Lint/SuppressedException
      end
    end

    puts
  end
end

#post_option_parser(configuration) ⇒ Object



6
7
8
# File 'lib/mcollective/application/help.rb', line 6

def post_option_parser(configuration)
  configuration[:application] = ARGV.shift unless ARGV.empty?
end