Use idiomatic #is_a? method instead of #class ==
This commit is contained in:
parent
39e4d6b3ba
commit
6ca731c13b
|
@ -186,7 +186,7 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns the filtered array of objects
|
# Returns the filtered array of objects
|
||||||
def where(input, key, value)
|
def where(input, key, value)
|
||||||
return input unless input.class == Array
|
return input unless input.is_a?(Array)
|
||||||
input.select { |object| object[key] == value }
|
input.select { |object| object[key] == value }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue