Sha256: 7ceaaec91d1ff3b5aee3f82f48f14a4d484173553b7569d30d6c9f0a69396411

Contents?: true

Size: 139 Bytes

Versions: 1

Compression:

Stored size: 139 Bytes

Contents

class Array
  def flatten_once
    inject([]) { |result, element| result.push(*element) }
  end unless method_defined?(:flatten_once)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
travis-core-0.0.1 lib/core_ext/array/flatten_once.rb