Sha256: ce779db0eedddc635f4175f41fc3cf88fefb4d15ad637e0f1a2539847da64b3d

Contents?: true

Size: 304 Bytes

Versions: 5

Compression:

Stored size: 304 Bytes

Contents

# Copied from ActiveSupport
# https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/array/wrap.rb
class Array
  def self.wrap(object)
    if object.nil?
      []
    elsif object.respond_to?(:to_ary)
      object.to_ary || [object]
    else
      [object]
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sandthorn_sequel_projection-0.1.0 lib/sandthorn_sequel_projection/utilities/core_extensions/array_wrap.rb
sandthorn_sequel_projection-0.0.4 lib/sandthorn_sequel_projection/utilities/core_extensions/array_wrap.rb
sandthorn_sequel_projection-0.0.3 lib/sandthorn_sequel_projection/utilities/core_extensions/array_wrap.rb
sandthorn_sequel_projection-0.0.2 lib/sandthorn_sequel_projection/utilities/core_extensions/array_wrap.rb
sandthorn_sequel_projection-0.0.1 lib/sandthorn_sequel_projection/utilities/core_extensions/array_wrap.rb