Class: Guideline::OptionParser
- Inherits:
-
OptionParser
- Object
- OptionParser
- Guideline::OptionParser
- Defined in:
- lib/guideline/option_parser.rb
Defined Under Namespace
Classes: Argument
Constant Summary collapse
- OPTIONS =
[ "--no-abc-complexity", "(default: true) check method ABC complexity", "--no-hard-tab-indent", "(default: true) check hard tab indent", "--no-hash-comma", "(default: true) check last comma in Hash literal", "--no-long-line", "(default: true) check line length", "--no-long-method", "(default: true) check method height", "--no-trailing-whitespace", "(default: true) check trailing whitespace", "--no-unused-method", "(default: true) check unused method", "--abc-complexity=", "(default: 15) threshold of ABC complexity", "--long-line=", "(default: 80) threshold of long line", "--long-method=", "(default: 10) threshold of long method", "--path=", "(default: ./) checked file or dir or glob pattern", ]
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ OptionParser
constructor
A new instance of OptionParser.
- #options ⇒ Object
- #parse ⇒ Object
Constructor Details
#initialize ⇒ OptionParser
Returns a new instance of OptionParser.
23 24 25 26 |
# File 'lib/guideline/option_parser.rb', line 23 def initialize(*) super end |
Class Method Details
.parse(argv = ARGV) ⇒ Object
19 20 21 |
# File 'lib/guideline/option_parser.rb', line 19 def self.parse(argv = ARGV) new.parse(argv) end |
Instance Method Details
#options ⇒ Object
33 34 35 |
# File 'lib/guideline/option_parser.rb', line 33 def @options ||= {} end |
#parse ⇒ Object
28 29 30 31 |
# File 'lib/guideline/option_parser.rb', line 28 def parse(*) super end |