mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
Use kind_of? instead of class.include? and rearrange stuff
This commit is contained in:
@@ -101,10 +101,10 @@ module Liquid
|
||||
def map(input, property)
|
||||
ary = if input.is_a?(Array)
|
||||
input.flatten
|
||||
elsif !input.class.include?(Enumerable)
|
||||
[input].flatten
|
||||
else
|
||||
elsif input.kind_of?(Enumerable)
|
||||
input
|
||||
else
|
||||
[input].flatten
|
||||
end
|
||||
|
||||
ary.map do |e|
|
||||
|
||||
Reference in New Issue
Block a user