Method: DataMapper::Collection#analyze

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

#analyzeObject



26
27
28
29
30
# File 'lib/ptj/ext/datamapper_collection.rb', line 26

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