Method: Optser.extract_options!

Defined in:
lib/optser.rb

.extract_options!(args) ⇒ Object

Extracts the options from the arguments list, and creates a brand new OptSet instance to lookup the options; pops the options off the args list if we have it.



38
39
40
# File 'lib/optser.rb', line 38

def self.extract_options!(args)
  return parse_options(args.last.is_a?(::Hash) ? args.pop : nil)
end