Module: Enumerable
- Defined in:
- lib/array_extensions.rb
Overview
for 1.9, zip is defined on Enumerable
Instance Method Summary collapse
Instance Method Details
#to_hash ⇒ Object
12 13 14 15 16 |
# File 'lib/array_extensions.rb', line 12 def to_hash {}.affect do |hash| self.each { |pair| hash[pair.first] = pair.last } end end |