Class: RR::HelpRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/rubyrep/command_runner.rb

Overview

Command runner to show help for other commands

Class Method Summary collapse

Class Method Details

.run(args) ⇒ Object

Runs the help command

  • args: array of command line parameters



129
130
131
132
133
134
135
136
137
138
139
140
# File 'lib/rubyrep/command_runner.rb', line 129

def self.run(args)
  if args[0] == 'help' or args[0] == '--help'
    $stderr.puts(<<EOS)
Usage: #{$0} help [command]

Shows the help for the specified command.
EOS
    0
  else
    CommandRunner.run([args[0], '--help'])
  end
end