Sha256: 2fc05563ac39c220f4f9e31d0605a0f9876dec39eb4ddaa163b5318c680f3d40
Contents?: true
Size: 515 Bytes
Versions: 9
Compression:
Stored size: 515 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
9 entries across 9 versions & 3 rubygems