Class: Projects::BatchForksCountService
- Inherits:
-
BatchCountService
- Object
- BatchCountService
- Projects::BatchForksCountService
- Defined in:
- app/services/projects/batch_forks_count_service.rb
Instance Method Summary collapse
-
#count_service ⇒ Object
rubocop: enable CodeReuse/ActiveRecord.
-
#global_count ⇒ Object
rubocop: disable CodeReuse/ActiveRecord.
Methods inherited from BatchCountService
#initialize, #project_ids, #refresh_cache_and_retrieve_data
Constructor Details
This class inherits a constructor from Projects::BatchCountService
Instance Method Details
#count_service ⇒ Object
rubocop: enable CodeReuse/ActiveRecord
16 17 18 |
# File 'app/services/projects/batch_forks_count_service.rb', line 16 def count_service ::Projects::ForksCountService end |
#global_count ⇒ Object
rubocop: disable CodeReuse/ActiveRecord
9 10 11 12 13 |
# File 'app/services/projects/batch_forks_count_service.rb', line 9 def global_count @global_count ||= count_service.query(project_ids) .group(:forked_from_project_id) .count end |