Module: Array::ArrayExtensions
- Included in:
- Array
- Defined in:
- lib/ragweed/utils.rb
Instance Method Summary collapse
-
#to_hash ⇒ Object
Convert to hash.
Instance Method Details
#to_hash ⇒ Object
Convert to hash
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ragweed/utils.rb', line 17 def to_hash # too clever. # Hash[*self.flatten] h = Hash.new each do |k,v| h[k] = v end h end |