class Array
Extend the core Array
class to include `.wrap`
Public Class Methods
wrap(object)
click to toggle source
Duplication of Ruby on Rails Array#wrap method
# File lib/array.rb, line 6 def self.wrap(object) if object.nil? [] elsif object.respond_to?(:to_ary) object.to_ary || [object] else [object] end end