Class: CodeHunter::OptionParser
- Inherits:
-
OptionParser
- Object
- OptionParser
- CodeHunter::OptionParser
- Defined in:
- lib/code_hunter/option_parser.rb
Defined Under Namespace
Classes: Argument
Constant Summary collapse
- OPTIONS =
[ "--application-path=", "(default: ./) rails application root path", "--format=", "(default: yaml) output format (yaml or json)", "--no-brakeman", "(default: false) disable brakeman", "--no-pendaxes", "(default: false) disable pendaxes", "--no-rails-best-practices", "(default: false) disable rails-best-practices", ]
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.
21 22 23 24 |
# File 'lib/code_hunter/option_parser.rb', line 21 def initialize(*) super end |
Class Method Details
.help ⇒ Object
17 18 19 |
# File 'lib/code_hunter/option_parser.rb', line 17 def self.help new.help end |
.parse!(argv) ⇒ Object
13 14 15 |
# File 'lib/code_hunter/option_parser.rb', line 13 def self.parse!(argv) new.parse!(argv) end |
Instance Method Details
#options ⇒ Object
31 32 33 |
# File 'lib/code_hunter/option_parser.rb', line 31 def @options ||= { :application_path => "./" } end |
#parse! ⇒ Object
26 27 28 29 |
# File 'lib/code_hunter/option_parser.rb', line 26 def parse!(*) super end |