Sha256: 35481830f2f1ddb58556bb3cc46a25d90af098027b7c9b3ab508768235fd8026
Contents?: true
Size: 517 Bytes
Versions: 19
Compression:
Stored size: 517 Bytes
Contents
%w(table).each do |path| MetricFu.metrics_require { "hotspots/analysis/#{path}" } end module MetricFu class Grouping def initialize(table, opts) column_name = opts.fetch(:by) hash = {} if column_name.to_sym == :metric # special optimized case hash = table.group_by_metric else raise "Unexpected column_name #{column_name}" end @arr = hash.to_a end def each @arr.each do |value, rows| yield value, rows end end end end
Version data entries
19 entries across 19 versions & 1 rubygems