Class: Projects::DailyStatisticsFinder
- Inherits:
-
Object
- Object
- Projects::DailyStatisticsFinder
- Defined in:
- app/finders/projects/daily_statistics_finder.rb
Instance Attribute Summary collapse
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
- #fetches ⇒ Object
-
#initialize(project) ⇒ DailyStatisticsFinder
constructor
A new instance of DailyStatisticsFinder.
- #total_fetch_count ⇒ Object
Constructor Details
#initialize(project) ⇒ DailyStatisticsFinder
Returns a new instance of DailyStatisticsFinder.
7 8 9 |
# File 'app/finders/projects/daily_statistics_finder.rb', line 7 def initialize(project) @project = project end |
Instance Attribute Details
#project ⇒ Object (readonly)
Returns the value of attribute project.
5 6 7 |
# File 'app/finders/projects/daily_statistics_finder.rb', line 5 def project @project end |
Instance Method Details
#fetches ⇒ Object
11 12 13 14 15 |
# File 'app/finders/projects/daily_statistics_finder.rb', line 11 def fetches ProjectDailyStatistic.of_project(project) .of_last_30_days .sorted_by_date_desc end |
#total_fetch_count ⇒ Object
17 18 19 |
# File 'app/finders/projects/daily_statistics_finder.rb', line 17 def total_fetch_count fetches.sum_fetch_count end |