Sha256: b68fcf43187327cd51702c663c3ced2f0a20a3ecf893b27113ca85e81e029895

Contents?: true

Size: 670 Bytes

Versions: 57

Compression:

Stored size: 670 Bytes

Contents

module Hyrax
  module Statistics
    module Users
      class OverTime < Statistics::OverTime
        # Overridden to do a noncumulative query
        def points
          Enumerator.new(size) do |y|
            x = @x_min
            while x <= @x_max
              bottom = x
              x += @delta_x.days
              y.yield [@x_output.call(x), point(bottom, x)]
            end
          end
        end

        private

          def relation
            ::User.registered
          end

          # Override to make an activerecord date range query
          def query(min, max)
            { created_at: min..max }
          end
      end
    end
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
hyrax-2.9.6 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.9.5 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.9.4 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.9.3 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.9.2 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.9.1 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.9.0 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.8.0 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.7.2 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.7.1 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.7.0 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.6.0 app/services/hyrax/statistics/users/over_time.rb
hyrax-3.0.0.pre.rc1 app/services/hyrax/statistics/users/over_time.rb
hyrax-3.0.0.pre.beta3 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.5.1 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.5.0 app/services/hyrax/statistics/users/over_time.rb
hyrax-3.0.0.pre.beta2 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.4.1 app/services/hyrax/statistics/users/over_time.rb
hyrax-3.0.0.pre.beta1 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.4.0 app/services/hyrax/statistics/users/over_time.rb