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.3.3 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.3.2 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.3.1 app/services/hyrax/statistics/users/over_time.rb
hyrax-1.1.1 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.3.0 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.0.3 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.2.4 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.2.3 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.2.2 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.2.1 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.2.0 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.1.0 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.1.0.rc4 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.1.0.rc3 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.1.0.rc2 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.1.0.rc1 app/services/hyrax/statistics/users/over_time.rb
hyrax-1.1.0 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.1.0.beta2 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.0.2 app/services/hyrax/statistics/users/over_time.rb
hyrax-2.1.0.beta1 app/services/hyrax/statistics/users/over_time.rb