Class: Tagomatic::OptionsParser
- Inherits:
-
Object
- Object
- Tagomatic::OptionsParser
- Defined in:
- lib/tagomatic/options_parser.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ OptionsParser
constructor
A new instance of OptionsParser.
- #parse!(arguments) ⇒ Object
- #show_help ⇒ Object
Constructor Details
#initialize(options) ⇒ OptionsParser
Returns a new instance of OptionsParser.
7 8 9 10 |
# File 'lib/tagomatic/options_parser.rb', line 7 def initialize() @options = @parser = create_parser end |
Instance Method Details
#parse!(arguments) ⇒ Object
12 13 14 15 |
# File 'lib/tagomatic/options_parser.rb', line 12 def parse!(arguments) @parser.parse!(arguments) @options[:files].concat(arguments) end |
#show_help ⇒ Object
17 18 19 |
# File 'lib/tagomatic/options_parser.rb', line 17 def show_help @parser.to_s end |