Methods

Archive::Tar::Minitar::Command::CommandHelp

Public Instance Methods

call(args, opts = {}, ioe = {}) click to toggle source
# File lib/archive/tar/minitar/command.rb, line 312
def call(args, opts = {}, ioe = {})
  ioe = CommandPattern.default_ioe(ioe)

  help_on = args.shift

  if CommandPattern.command?(help_on)
    ioe[:output] << CommandPattern[help_on].help
  elsif help_on == "commands"
    ioe[:output] << The commands known to minitar are:    minitar create          Creates a new tarfile.    minitar extract         Extracts files from a tarfile.    minitar list            Lists files in the tarfile.All commands accept the options --verbose and --progress, which aremutually exclusive. In "minitar list", --progress means the same as--verbose.  --verbose, -V     Performs the requested command verbosely.  --progress, -P    Shows a progress bar, if appropriate, for the action                    being performed.
  else
    ioe[:output] << "Unknown command: #{help_on}\n" unless help_on.nil? or help_on.empty?
    ioe[:output] << self.help
  end

  0
end
help() click to toggle source
# File lib/archive/tar/minitar/command.rb, line 344
def help
  help = This is a basic help message containing pointers to more information onhow to use this command-line tool. Try:    minitar help commands       list all 'minitar' commands    minitar help <COMMAND>      show help on <COMMAND>                                  (e.g., 'minitar help create')
end
name() click to toggle source
# File lib/archive/tar/minitar/command.rb, line 308
def name
  "help"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.