Class: Gtmtech::Crypto::Subcommands::Help

Inherits:
Gtmtech::Crypto::Subcommand show all
Defined in:
lib/gtmtech/crypto/subcommands/help.rb

Class Method Summary collapse

Methods inherited from Gtmtech::Crypto::Subcommand

all_options, error, find, hidden?, parse, prettyname, usage, validate

Class Method Details

.descriptionObject



33
34
35
# File 'lib/gtmtech/crypto/subcommands/help.rb', line 33

def self.description
  "print help message"
end

.executeObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/gtmtech/crypto/subcommands/help.rb', line 15

def self.execute
  puts <<-EOS
Welcome to gtmtech-crypto #{Gtmtech::Crypto::VERSION} 

Usage:
crypto <subcommand> ... [global-opts] [subcommand-opts]

Available subcommands:
#{Gtmtech::Crypto::CLI.subcommands.collect {|command|
  command_class = Gtmtech::Crypto::Subcommands.const_get(Utils.camelcase command)
  sprintf "%15s: %-65s", command.downcase, command_class.description unless command_class.hidden?
}.compact.join("\n")}

For more help on an individual command, use --help on that command

EOS
end

.optionsObject



11
12
13
# File 'lib/gtmtech/crypto/subcommands/help.rb', line 11

def self.options
  []
end