Class: Spanx::Usage

Inherits:
Object
  • Object
show all
Defined in:
lib/spanx/usage.rb

Constant Summary collapse

HEADER =
%q{Usage: spanx [ --help | <command> ]  [options]}

Class Method Summary collapse

Class Method Details

.usageObject



5
6
7
8
9
10
11
# File 'lib/spanx/usage.rb', line 5

def self.usage
  out = ''
  out << HEADER + "\n\n"
  Spanx::CLI.subclasses.each_pair{|command, clazz| out << "#{sprintf "%10s", command}\t#{clazz.description}\n"}
  out << "\nRun 'spanx <command> --help' to see command-specific options.\n"
  out
end