Class: SimpleCovMcp::OptionParserBuilder
- Inherits:
-
Object
- Object
- SimpleCovMcp::OptionParserBuilder
- Defined in:
- lib/simplecov_mcp/option_parser_builder.rb
Constant Summary collapse
- HORIZONTAL_RULE =
'-' * 79
- SUBCOMMANDS =
%w[list summary raw uncovered detailed totals validate version].freeze
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #build_option_parser ⇒ Object
-
#initialize(config) ⇒ OptionParserBuilder
constructor
A new instance of OptionParserBuilder.
Constructor Details
#initialize(config) ⇒ OptionParserBuilder
Returns a new instance of OptionParserBuilder.
13 14 15 |
# File 'lib/simplecov_mcp/option_parser_builder.rb', line 13 def initialize(config) @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
11 12 13 |
# File 'lib/simplecov_mcp/option_parser_builder.rb', line 11 def config @config end |
Instance Method Details
#build_option_parser ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/simplecov_mcp/option_parser_builder.rb', line 17 def build_option_parser require 'optparse' OptionParser.new do |parser| (parser) define_subcommands_help(parser) (parser) define_examples(parser) add_help_handler(parser) end end |