Class: Swgr2rb::CliOptionsParser
- Inherits:
-
Object
- Object
- Swgr2rb::CliOptionsParser
- Defined in:
- lib/cli/cli_options_parser.rb
Overview
CliOptionsParser parses arguments received from command line and generates parameters for endpoint generation.
Instance Method Summary collapse
-
#initialize ⇒ CliOptionsParser
constructor
A new instance of CliOptionsParser.
- #parse(args) ⇒ Object
Constructor Details
#initialize ⇒ CliOptionsParser
Returns a new instance of CliOptionsParser.
10 11 12 |
# File 'lib/cli/cli_options_parser.rb', line 10 def initialize @params = default_params end |
Instance Method Details
#parse(args) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/cli/cli_options_parser.rb', line 14 def parse(args) option_parser = OptionParser.new do |parser| (parser) end (option_parser, args) path = parse_swagger_path_from_args(args) [path, @params] end |