Module: DataMapper::Ext::Array
- Defined in:
- lib/dm-core/support/ext/array.rb
Class Method Summary collapse
-
.to_mash(array) ⇒ Mash
Transforms an Array of key/value pairs into a Mash.
Class Method Details
.to_mash(array) ⇒ Mash
16 17 18 19 20 |
# File 'lib/dm-core/support/ext/array.rb', line 16 def self.to_mash(array) m = Mash.new array.each { |k,v| m[k] = v } m end |