Sha256: aa409c8d8f505180c5555e66c14245e63304a8e6b32a00c7423c1ccac3241bcc

Contents?: true

Size: 500 Bytes

Versions: 41

Compression:

Stored size: 500 Bytes

Contents

module RailsPerformance
  module Reports
    class BaseReport
      attr_reader :db, :group, :sort, :title

      def initialize(db, group: nil, sort: nil, title: nil)
        @db     = db
        @group  = group
        @sort   = sort
        @title  = title

        set_defaults
      end

      def collect
        db.group_by(group).inject([]) do |res, (k,v)|
          res << yield(k, v)
          res
        end
      end

      def set_defaults; end
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
rails_performance-1.2.0.alpha1 lib/rails_performance/reports/base_report.rb
rails_performance-1.1.0 lib/rails_performance/reports/base_report.rb
rails_performance-1.0.5.3 lib/rails_performance/reports/base_report.rb
rails_performance-1.0.5.2 lib/rails_performance/reports/base_report.rb
rails_performance-1.0.5.1 lib/rails_performance/reports/base_report.rb
rails_performance-1.0.5 lib/rails_performance/reports/base_report.rb
rails_performance-1.0.4 lib/rails_performance/reports/base_report.rb
rails_performance-1.0.3 lib/rails_performance/reports/base_report.rb
rails_performance-1.0.2 lib/rails_performance/reports/base_report.rb
rails_performance-1.0.1 lib/rails_performance/reports/base_report.rb
rails_performance-1.0.0 lib/rails_performance/reports/base_report.rb
rails_performance-1.0.0.beta5 lib/rails_performance/reports/base_report.rb
rails_performance-1.0.0.beta4 lib/rails_performance/reports/base_report.rb
rails_performance-1.0.0.beta3 lib/rails_performance/reports/base_report.rb
rails_performance-1.0.0.beta2 lib/rails_performance/reports/base_report.rb
rails_performance-1.0.0.beta1 lib/rails_performance/reports/base_report.rb
rails_performance-0.9.9 lib/rails_performance/reports/base_report.rb
rails_performance-0.9.8 lib/rails_performance/reports/base_report.rb
rails_performance-0.9.7 lib/rails_performance/reports/base_report.rb
rails_performance-0.9.6 lib/rails_performance/reports/base_report.rb