Class: MaintenanceTasks::NullCollectionBuilder Private
- Inherits:
-
Object
- Object
- MaintenanceTasks::NullCollectionBuilder
- Defined in:
- app/models/maintenance_tasks/null_collection_builder.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Base strategy for building a collection-based Task to be performed.
Instance Method Summary collapse
-
#collection(task) ⇒ Object
private
Placeholder method to raise in case a subclass fails to implement the expected instance method.
-
#count(task) ⇒ Integer?
private
Total count of iterations to be performed.
-
#has_csv_content? ⇒ Boolean
private
Return that the Task does not process CSV content.
-
#no_collection? ⇒ Boolean
private
Returns that the Task processes a collection.
Instance Method Details
#collection(task) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Placeholder method to raise in case a subclass fails to implement the expected instance method.
13 14 15 |
# File 'app/models/maintenance_tasks/null_collection_builder.rb', line 13 def collection(task) raise NoMethodError, "#{task.class.name} must implement `collection`." end |
#count(task) ⇒ Integer?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Total count of iterations to be performed.
Tasks override this method to define the total amount of iterations expected at the start of the run. Return nil
if the amount is undefined, or counting would be prohibitive for your database.
24 25 26 |
# File 'app/models/maintenance_tasks/null_collection_builder.rb', line 24 def count(task) :no_count end |
#has_csv_content? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return that the Task does not process CSV content.
29 30 31 |
# File 'app/models/maintenance_tasks/null_collection_builder.rb', line 29 def has_csv_content? false end |
#no_collection? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns that the Task processes a collection.
34 35 36 |
# File 'app/models/maintenance_tasks/null_collection_builder.rb', line 34 def no_collection? false end |