class MetricFu::Grouping
Public Class Methods
new(table, opts)
click to toggle source
# File lib/metric_fu/metrics/hotspots/analysis/grouping.rb, line 6 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
Public Instance Methods
each() { |value, rows| ... }
click to toggle source
# File lib/metric_fu/metrics/hotspots/analysis/grouping.rb, line 17 def each @arr.each do |value, rows| yield value, rows end end