Class: Tagomatic::OptionsParser

Inherits:
Object
  • Object
show all
Defined in:
lib/tagomatic/options_parser.rb

Instance Method Summary collapse

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)
  @options = 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_helpObject



17
18
19
# File 'lib/tagomatic/options_parser.rb', line 17

def show_help
  @parser.to_s
end