Class: Gitlab::ImportExport::StatisticsRestorer
- Inherits:
-
Object
- Object
- Gitlab::ImportExport::StatisticsRestorer
- Defined in:
- lib/gitlab/import_export/statistics_restorer.rb
Instance Method Summary collapse
-
#initialize(project:, shared:) ⇒ StatisticsRestorer
constructor
A new instance of StatisticsRestorer.
- #restore ⇒ Object
Constructor Details
#initialize(project:, shared:) ⇒ StatisticsRestorer
Returns a new instance of StatisticsRestorer.
6 7 8 9 |
# File 'lib/gitlab/import_export/statistics_restorer.rb', line 6 def initialize(project:, shared:) @project = project @shared = shared end |
Instance Method Details
#restore ⇒ Object
11 12 13 14 15 16 |
# File 'lib/gitlab/import_export/statistics_restorer.rb', line 11 def restore @project.statistics.refresh! rescue StandardError => e @shared.error(e) false end |