Class: MaintenanceTasks::NoCollectionBuilder Private

Inherits:
Object
  • Object
show all
Defined in:
app/models/maintenance_tasks/no_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.

Strategy for building a Task that has no collection. These Tasks consist of a single iteration.

Instance Method Summary collapse

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.

Specifies that this task does not process a collection.



10
11
12
# File 'app/models/maintenance_tasks/no_collection_builder.rb', line 10

def collection(_task)
  :no_collection
end

#count(_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.

The number of rows to be processed. Always returns 1.



15
16
17
# File 'app/models/maintenance_tasks/no_collection_builder.rb', line 15

def count(_task)
  1
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.

Returns:

  • (Boolean)


20
21
22
# File 'app/models/maintenance_tasks/no_collection_builder.rb', line 20

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 is collection-less.

Returns:

  • (Boolean)


25
26
27
# File 'app/models/maintenance_tasks/no_collection_builder.rb', line 25

def no_collection?
  true
end