Method: Array#analyze

Defined in:
lib/ptj/ext/datamapper_collection.rb

#analyzeObject



45
46
47
48
49
# File 'lib/ptj/ext/datamapper_collection.rb', line 45

def analyze
  h = Hash.new(0)
  self.each { | v | h.store(v, h[v]+1) }
  h
end