Sha256: dee855b6c38479866f5cb1d5eb8449a4bdef80e312cab1ab51da94c0e1f6b6a6

Contents?: true

Size: 236 Bytes

Versions: 2

Compression:

Stored size: 236 Bytes

Contents

unless Object.const_defined?('ActiveSupport')
  class Array
    def self.wrap(object)
      if object.nil?
        []
      elsif object.respond_to?(:to_ary)
        object.to_ary
      else
        [object]
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
garb-0.9.8 lib/garb/core_ext/array.rb
garb-0.9.7 lib/garb/core_ext/array.rb