Clean up Verification.contain

This commit is contained in:
Prommah 2015-11-04 14:26:32 +00:00
parent 83efd5f21c
commit a8e4e1095d

View file

@ -56,9 +56,6 @@ module Verification
# TODO: rikki? # TODO: rikki?
# Returns true if params (or its keys) are a subset of filter # Returns true if params (or its keys) are a subset of filter
def self.contain(params, filter) def self.contain(params, filter)
(params.instance_of?(Array) ? params : params.keys).each do |key| ((params.instance_of?(Array) ? params : params.keys) - filter).empty?
return false unless filter.include? key.to_sym
end
true
end end
end end