Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Commit

Permalink
Update ext/array docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
gix committed Mar 6, 2011
1 parent 6b0af45 commit 153aa92
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/dm-core/ext/array.rb
Expand Up @@ -12,14 +12,14 @@ module Array
# @return [Hash]
# A Hash where each entry in the Array is turned into a key/value.
#
# @api public
# @api semipublic
def self.to_hash(array)
h = {}
array.each { |k,v| h[k] = v }
h
end

# Transforms an Array of key/value pairs into a Mash.
# Transforms an Array of key/value pairs into a {Mash}.
#
# This is a better idiom than using Mash[*array.flatten] in Ruby 1.8.6
# because it is not possible to limit the flattening to a single
Expand All @@ -29,9 +29,9 @@ def self.to_hash(array)
# The array of key/value pairs to transform.
#
# @return [Mash]
# A Hash where each entry in the Array is turned into a key/value.
# A {Mash} where each entry in the Array is turned into a key/value.
#
# @api public
# @api semipublic
def self.to_mash(array)
m = Mash.new
array.each { |k,v| m[k] = v }
Expand Down

0 comments on commit 153aa92

Please sign in to comment.