Class: MetadataCop::Options
- Inherits:
-
Object
- Object
- MetadataCop::Options
- Defined in:
- lib/metadatacop/options.rb
Class Method Summary collapse
Class Method Details
.parse(args) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/metadatacop/options.rb', line 5 def self.parse(args) = {} parser().parse!(args) end |
.parser(options) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/metadatacop/options.rb', line 12 def self.parser() OptionParser.new do |opts| opts.on('-t', '--type [TYPE]', 'Rules to apply') do |t| [:type] = t end opts.on('-h', '--help', 'Prints this help') do puts opts exit end end end |