Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll-tailwind.rb

Class Method Summary collapse

Class Method Details

.wrap(object) ⇒ Object

Taken from rails/activesupport/lib/active_support/core_ext/array/wrap.rb



48
49
50
51
52
53
54
55
56
# File 'lib/jekyll-tailwind.rb', line 48

def self.wrap(object)
  if object.nil?
    []
  elsif object.respond_to?(:to_ary)
    object.to_ary || [object]
  else
    [object]
  end
end