Methods
Public Instance methods
wrap(object)

Wraps the object in an Array unless it‘s an Array. Converts the object to an Array using to_ary if it implements that.

    # File activesupport/lib/active_support/core_ext/array/wrapper.rb, line 7
 7:         def wrap(object)
 8:           case object
 9:           when nil
10:             []
11:           when self
12:             object
13:           else
14:             if object.respond_to?(:to_ary)
15:               object.to_ary
16:             else
17:               [object]
18:             end
19:           end
20:         end