Sha256: cff5c4b35304173a0f4c1aed89ab09ae37ed30a6838a9ec7043d239de73dfe03
Contents?: true
Size: 529 Bytes
Versions: 12
Compression:
Stored size: 529 Bytes
Contents
class Hash #increments a hash with the stats defined in h_stats # three levels: # STATS->plugin_name->Property->count def add_stats(h_stats) h=self h_stats.each do |plugin_hash,add_stats| h[plugin_hash]={} if h[plugin_hash].nil? add_stats.each do |property,hash_value| h[plugin_hash][property]={} if h[plugin_hash][property].nil? hash_value.each do |value, count| h[plugin_hash][property][value]=(h[plugin_hash][property][value]||0) + count end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems