Sha256: c6b40d8e891f2a14932da87293fa4969cf662388f6a83ad0c54da926e92a31d0

Contents?: true

Size: 297 Bytes

Versions: 23

Compression:

Stored size: 297 Bytes

Contents

class Array

  ##
  # atm it assumes self is an array of [key,value]-arrays
  # this is just a better way to make hashes than Hash[*array.flatten]
  # since you cannot flatten only one level in ruby 1.8.6
  #
  def to_hash
    h = {}
    self.each{ |k,v| h[k] = v }
    h
  end
end # class Symbol

Version data entries

23 entries across 23 versions & 6 rubygems

Version Path
datamapper-dm-core-0.9.11 lib/dm-core/support/array.rb
joevandyk-dm-core-0.9.6 lib/dm-core/support/array.rb
rpbertp13-dm-core-0.9.11.1 lib/dm-core/support/array.rb
rpbertp13-dm-core-0.9.11.2 lib/dm-core/support/array.rb
sam-dm-core-0.9.10 lib/dm-core/support/array.rb
sam-dm-core-0.9.11 lib/dm-core/support/array.rb
sam-dm-core-0.9.6 lib/dm-core/support/array.rb
sam-dm-core-0.9.7 lib/dm-core/support/array.rb
sam-dm-core-0.9.8 lib/dm-core/support/array.rb
sam-dm-core-0.9.9 lib/dm-core/support/array.rb
dm-core-0.9.2 lib/dm-core/support/array.rb
dm-core-0.9.11 lib/dm-core/support/array.rb
dm-core-0.9.10 lib/dm-core/support/array.rb
dm-core-0.9.3 lib/dm-core/support/array.rb
dm-core-0.9.4 lib/dm-core/support/array.rb
dm-core-0.9.7 lib/dm-core/support/array.rb
dm-core-0.9.6 lib/dm-core/support/array.rb
dm-core-0.9.5 lib/dm-core/support/array.rb
dm-core-0.9.8 lib/dm-core/support/array.rb
dm-core-0.9.9 lib/dm-core/support/array.rb