Sha256: 842ace43f2551291b8b5d5fa45f431dd49a7a42d42bed35751166f2c17439ebd

Contents?: true

Size: 198 Bytes

Versions: 1

Compression:

Stored size: 198 Bytes

Contents

module Prosperity
  class Aggregate::Average < Aggregate::WithColumn
    def to_sql
      "AVG(#{column})"
    end

    def apply(scope, options = {})
      scope.average(column)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
prosperity-0.0.11 lib/prosperity/aggregate/average.rb