debian-mirror-gitlab/app/finders/projects/daily_statistics_finder.rb

22 lines
366 B
Ruby
Raw Normal View History

2019-07-07 11:18:12 +05:30
# frozen_string_literal: true
module Projects
class DailyStatisticsFinder
attr_reader :project
def initialize(project)
@project = project
end
def fetches
ProjectDailyStatistic.of_project(project)
.of_last_30_days
.sorted_by_date_desc
end
def total_fetch_count
fetches.sum_fetch_count
end
end
end