Class: Lintrunner::Options
- Inherits:
-
Object
- Object
- Lintrunner::Options
- Defined in:
- lib/lintrunner/options.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize ⇒ Options
constructor
A new instance of Options.
- #parse(args) ⇒ Object
- #test ⇒ Object
Constructor Details
#initialize ⇒ Options
Returns a new instance of Options.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/lintrunner/options.rb', line 9 def initialize = {} @option_parser = OptionParser.new do |opts| (opts) add_config_option(opts) add_context_option(opts) add_include_path_option(opts) add_reporter_option(opts) end end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/lintrunner/options.rb', line 6 def end |
Instance Method Details
#parse(args) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/lintrunner/options.rb', line 20 def parse(args) @option_parser.parse!(args) add_defaults [:path] = args.first if args.first end |
#test ⇒ Object
8 |
# File 'lib/lintrunner/options.rb', line 8 def test; require 'pry'; binding.pry;end |