Class: Loxxy::CLIParser
- Inherits:
-
OptionParser
- Object
- OptionParser
- Loxxy::CLIParser
- Defined in:
- lib/loxxy/cli_parser.rb
Overview
A command-line option parser for the Loxxy interpreter. It is a specialisation of the OptionParser class.
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(prog_name, ver) ⇒ CLIParser
constructor
Constructor.
- #parse!(args) ⇒ Object
Constructor Details
#initialize(prog_name, ver) ⇒ CLIParser
Constructor.
13 14 15 16 17 18 19 20 21 |
# File 'lib/loxxy/cli_parser.rb', line 13 def initialize(prog_name, ver) super() reset(prog_name, ver) heading separator 'Options:' separator '' end |
Instance Attribute Details
#parsed_options ⇒ Hash{Symbol=>String, Array} (readonly)
10 11 12 |
# File 'lib/loxxy/cli_parser.rb', line 10 def @parsed_options end |
Instance Method Details
#parse!(args) ⇒ Object
23 24 25 26 |
# File 'lib/loxxy/cli_parser.rb', line 23 def parse!(args) super end |