Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/ext/array.rb
Instance Method Summary collapse
Instance Method Details
#to_hash(keys) ⇒ Object
2 3 4 5 6 |
# File 'lib/ext/array.rb', line 2 def to_hash(keys) hash = {} keys.zip(self).each { |k, v| hash[k] = v } hash end |