Class: SecureKeys::Core::Console::Argument::Parser

Inherits:
OptionParser
  • Object
show all
Defined in:
lib/core/console/arguments/parser.rb

Instance Method Summary collapse

Constructor Details

#initializeParser

Initialize the argument parser with the default options



14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/core/console/arguments/parser.rb', line 14

def initialize
  super('Usage: secure-keys [--options]')
  separator('')

  # Route known subcommands before processing flags.
  # Like --help and --version, subcommand handlers exit internally,
  # so the generator is never reached.
  route_subcommand!

  # Configure the argument parser
  configure!
  order!(into: Handler.arguments)
  configure_sub_arguments
end