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