Class: Projects::FetchStatisticsIncrementService
- Inherits:
-
Object
- Object
- Projects::FetchStatisticsIncrementService
- Defined in:
- app/services/projects/fetch_statistics_increment_service.rb
Instance Attribute Summary collapse
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(project) ⇒ FetchStatisticsIncrementService
constructor
A new instance of FetchStatisticsIncrementService.
Constructor Details
#initialize(project) ⇒ FetchStatisticsIncrementService
Returns a new instance of FetchStatisticsIncrementService.
7 8 9 |
# File 'app/services/projects/fetch_statistics_increment_service.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/services/projects/fetch_statistics_increment_service.rb', line 5 def project @project end |
Instance Method Details
#execute ⇒ Object
11 12 13 14 15 |
# File 'app/services/projects/fetch_statistics_increment_service.rb', line 11 def execute ProjectDailyStatistic .find_or_create_project_daily_statistic(project.id, Date.today) .increment_fetch_count(1) end |