Class: CovLoupe::OptionParserBuilder
- Inherits:
-
Object
- Object
- CovLoupe::OptionParserBuilder
- Defined in:
- lib/cov_loupe/config/option_parser_builder.rb
Constant Summary collapse
- HORIZONTAL_RULE =
'-' * 79
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.
15 16 17 |
# File 'lib/cov_loupe/config/option_parser_builder.rb', line 15 def initialize(config) @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
13 14 15 |
# File 'lib/cov_loupe/config/option_parser_builder.rb', line 13 def config @config end |
Instance Method Details
#build_option_parser ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/cov_loupe/config/option_parser_builder.rb', line 19 def build_option_parser require 'optparse' OptionParser.new do |parser| (parser) define_environment_help(parser) define_subcommands_help(parser) (parser) define_examples(parser) end end |