Class: Yuzu::Command::Help

Inherits:
ConfiglessCommand show all
Defined in:
lib/yuzu/commands/help.rb

Instance Method Summary collapse

Methods inherited from ConfiglessCommand

help, requires_config?

Constructor Details

#initialize(args) ⇒ Help

Returns a new instance of Help.



4
5
6
# File 'lib/yuzu/commands/help.rb', line 4

def initialize(args)
  @args = args
end

Instance Method Details

#indexObject



8
9
10
11
12
13
14
15
# File 'lib/yuzu/commands/help.rb', line 8

def index
  if @args.first.nil?
    puts ArgParser.parse(["--help"])
  else
    command_class, method = Yuzu::Command.parse(@args.first)
    puts command_class.help(method)
  end
end