Method: Bundler::Thor.check_unknown_options!

Defined in:
lib/bundler/vendor/thor/lib/thor.rb

.check_unknown_options!(options = {}) ⇒ Object

Extend check unknown options to accept a hash of conditions.

Parameters

options<Hash>: A hash containing :only and/or :except keys



255
256
257
258
259
260
261
262
263
264
265
# File 'lib/bundler/vendor/thor/lib/thor.rb', line 255

def check_unknown_options!(options = {})
  @check_unknown_options ||= {}
  options.each do |key, value|
    if value
      @check_unknown_options[key] = Array(value)
    else
      @check_unknown_options.delete(key)
    end
  end
  @check_unknown_options
end