Class: Trustworthy::CLI
- Inherits:
-
Object
- Object
- Trustworthy::CLI
- Includes:
- Command
- Defined in:
- lib/trustworthy/cli.rb,
lib/trustworthy/cli/init.rb,
lib/trustworthy/cli/crypt.rb,
lib/trustworthy/cli/add_key.rb,
lib/trustworthy/cli/command.rb,
lib/trustworthy/cli/decrypt.rb,
lib/trustworthy/cli/encrypt.rb
Defined Under Namespace
Modules: Command, Crypt Classes: AddKey, Decrypt, Encrypt, Init
Constant Summary collapse
- Commands =
{ 'add-key' => Trustworthy::CLI::AddKey, 'init' => Trustworthy::CLI::Init, 'decrypt' => Trustworthy::CLI::Decrypt, 'encrypt' => Trustworthy::CLI::Encrypt }
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Command
#default_options, #parse_options, #print_help, #say
Class Method Details
.banner ⇒ Object
25 26 27 |
# File 'lib/trustworthy/cli.rb', line 25 def self. "Trustworthy CLI v#{Trustworthy::VERSION}" end |
Instance Method Details
#_print_help ⇒ Object
39 40 41 42 43 44 45 46 |
# File 'lib/trustworthy/cli.rb', line 39 def _print_help say("#{Trustworthy::CLI.}\n\n") say('Commands:') Commands.each do |name, klass| say(' %-8s %s' % [name, klass.description]) end say("\nSee 'trustworthy <command> --help' for more information on a specific command") end |