Class: Yalphabetize::OptionParser
- Inherits:
-
Object
- Object
- Yalphabetize::OptionParser
- Defined in:
- lib/yalphabetize/option_parser.rb
Constant Summary collapse
- PARSER =
::OptionParser.new do |o| o. = 'Usage: yalphabetize [options] [file1, file2, ...]' o.on('-a', '--autocorrect', 'Automatically alphabetize inspected yaml files') o.on('-h', '--help', 'Prints this help') do puts o Kernel.exit end end
Class Method Summary collapse
Class Method Details
.parse!(argv) ⇒ Object
17 18 19 |
# File 'lib/yalphabetize/option_parser.rb', line 17 def self.parse!(argv) {}.tap { || PARSER.parse!(argv, into: ) } end |