Class: RegoValidate::OptionsParser
- Inherits:
-
Object
- Object
- RegoValidate::OptionsParser
- Defined in:
- lib/ruby/rego/cli.rb
Overview
Parses CLI arguments into a structured options object.
Defined Under Namespace
Classes: OptionDefinitions, ParseResultBuilder
Constant Summary collapse
- VALID_FORMATS =
%w[text json].freeze
Instance Method Summary collapse
-
#initialize(argv) ⇒ OptionsParser
constructor
Create an options parser.
-
#parse ⇒ ParseResult
Parse arguments into an options result.
Constructor Details
#initialize(argv) ⇒ OptionsParser
Create an options parser.
216 217 218 |
# File 'lib/ruby/rego/cli.rb', line 216 def initialize(argv) @argv = argv end |
Instance Method Details
#parse ⇒ ParseResult
Parse arguments into an options result.
223 224 225 |
# File 'lib/ruby/rego/cli.rb', line 223 def parse ParseResultBuilder.new(argv).call end |