mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 04:51:14 +00:00
Clean up Verification.contain
This commit is contained in:
parent
9ef8b7a24b
commit
7bbb1a1fb1
1 changed files with 1 additions and 4 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue