Class: TodoLint::Options
- Inherits:
-
Object
- Object
- TodoLint::Options
- Defined in:
- lib/todo_lint/options.rb
Overview
Handles option parsing for the command line application.
Instance Method Summary collapse
-
#parse(args) ⇒ Hash
Parses command line options into an options hash.
Instance Method Details
#parse(args) ⇒ Hash
Parses command line options into an options hash
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/todo_lint/options.rb', line 11 def parse(args) @options = { :report => false } OptionParser.new do |parser| parser. = "Usage: todo_lint [options] [files]" parser parser parser report_version parser parser end.parse!(args) # Any remaining arguments are assumed to be files [:files] = args end |