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,
lib/cl/help/format.rb

Defined Under Namespace

Modules: Format 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

cmds, #deprecations, #initialize, #opts, parse, suggestions

Methods included from Merge

#merge

Methods included from Suggest

#suggest

Methods included from Underscore

#underscore

Methods included from Cmd::Dsl

#abstract, #abstract?, #arg, #args, #description, #examples, #opt, #opts, #required, #required?, #summary

Constructor Details

This class inherits a constructor from Cl::Cmd

Instance Method Details

#helpObject



11
12
13
# File 'lib/cl/help.rb', line 11

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

#help?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/cl/help.rb', line 15

def help?
  true
end

#runObject



7
8
9
# File 'lib/cl/help.rb', line 7

def run
  ctx.puts help
end