Class: SkillBench::Services::CompareOptionParser
- Inherits:
-
Object
- Object
- SkillBench::Services::CompareOptionParser
- Defined in:
- lib/skill_bench/services/compare_option_parser.rb
Overview
Parses CLI options for the compare command.
Class Method Summary collapse
-
.call(argv) ⇒ Hash
Parses the given argv and returns the options hash.
Instance Method Summary collapse
-
#call ⇒ Hash
Parses options from argv.
-
#initialize(argv) ⇒ CompareOptionParser
constructor
A new instance of CompareOptionParser.
Constructor Details
#initialize(argv) ⇒ CompareOptionParser
Returns a new instance of CompareOptionParser.
19 20 21 |
# File 'lib/skill_bench/services/compare_option_parser.rb', line 19 def initialize(argv) @argv = argv end |
Class Method Details
.call(argv) ⇒ Hash
Parses the given argv and returns the options hash.
14 15 16 |
# File 'lib/skill_bench/services/compare_option_parser.rb', line 14 def self.call(argv) new(argv).call end |
Instance Method Details
#call ⇒ Hash
Parses options from argv.
27 28 29 30 31 32 |
# File 'lib/skill_bench/services/compare_option_parser.rb', line 27 def call = { format: :human } parser = build_parser() parser.parse!(@argv) end |