class Thor

def check_unknown_options!(options = {})

options: A hash containing :only and/or :except keys
=== Parameters

Extend check unknown options to accept a hash of conditions.
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