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: false) check method ABC complexity", "--no-hard-tab-indent", "(default: false) check hard tab indent", "--no-hash-comma", "(default: false) check last comma in Hash literal", "--no-long-line", "(default: false) check line length", "--no-long-method", "(default: false) check method height", "--no-trailing-whitespace", "(default: false) check trailing whitespace", "--no-unused-method", "(default: false) check unused method", "--no-detail", "(default: false) only render summary", "--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.
24 25 26 27 |
# File 'lib/guideline/option_parser.rb', line 24 def initialize(*) super end |
Class Method Details
.parse(argv = ARGV) ⇒ Object
20 21 22 |
# File 'lib/guideline/option_parser.rb', line 20 def self.parse(argv = ARGV) new.parse(argv) end |
Instance Method Details
#options ⇒ Object
34 35 36 |
# File 'lib/guideline/option_parser.rb', line 34 def @options ||= {} end |
#parse ⇒ Object
29 30 31 32 |
# File 'lib/guideline/option_parser.rb', line 29 def parse(*) super end |