class Array
Public Instance Methods
to_hash()
click to toggle source
# File lib/support/core_ext.rb, line 2 def to_hash hash = {} self.each {|e| hash[e] = (hash[e]? hash[e] + 1 : 1) } hash end
# File lib/support/core_ext.rb, line 2 def to_hash hash = {} self.each {|e| hash[e] = (hash[e]? hash[e] + 1 : 1) } hash end