Sha256: db231c8c7d839da9967814230190c3b188cb7e05ac6d5b42fa34adaf65bba0a3

Contents?: true

Size: 241 Bytes

Versions: 10

Compression:

Stored size: 241 Bytes

Contents

class Hash

  # Like Array#join but specialized to Hash.
  #
  # CREDIT: Mauricio Fernandez

  def join(pair_divider='', elem_divider='')
    s = []
    each_pair { |k,v| s << "#{k}#{pair_divider}#{v}" }
    s.join(elem_divider)
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
facets-2.8.4 lib/core/facets/hash/join.rb
facets-2.8.3 lib/core/facets/hash/join.rb
facets-2.8.2 lib/core/facets/hash/join.rb
facets-2.8.1 lib/core/facets/hash/join.rb
facets-2.8.0 lib/core/facets/hash/join.rb
facets-2.7.0 lib/core/facets/hash/join.rb
facets-2.6.0 lib/core/facets/hash/join.rb
facets-2.5.1 lib/core/facets/hash/join.rb
facets-2.5.0 lib/core/facets/hash/join.rb
facets-2.5.2 lib/core/facets/hash/join.rb