Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/ext/core.rb

Instance Method Summary collapse

Instance Method Details

#to_hashObject

[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