Class: Cl::Help

Inherits:
Cmd
  • Object
show all
Defined in:
lib/cl/help.rb,
lib/cl/help/cmd.rb,
lib/cl/help/cmds.rb,
lib/cl/help/table.rb,
lib/cl/help/usage.rb

Defined Under Namespace

Classes: Cmd, Cmds, Table, Usage

Constant Summary

Constants included from Merge

Merge::MERGE

Instance Attribute Summary

Attributes inherited from Cmd

#args, #ctx

Instance Method Summary collapse

Methods inherited from Cmd

abstract, arg, args, cmds, #deprecated_opts, description, examples, #initialize, opt, #opts, opts, parse, required, required?, summary, underscore

Methods included from Merge

#merge

Constructor Details

This class inherits a constructor from Cl::Cmd

Instance Method Details

#helpObject


9
10
11
# File 'lib/cl/help.rb', line 9

def help
  args.any? ? Cmd.new(cmd).format : Cmds.new(cmds).format
end

#runObject


5
6
7
# File 'lib/cl/help.rb', line 5

def run
  ctx.puts help
end