Class: Kiba::Extend::Utils::IterativeCleanupJobRegistrar

Inherits:
Object
  • Object
show all
Defined in:
lib/kiba/extend/utils/iterative_cleanup_job_registrar.rb

Overview

Adds jobs defined by Mixins::IterativeCleanup to registry

Since:

  • 4.0.0

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeIterativeCleanupJobRegistrar

Returns a new instance of IterativeCleanupJobRegistrar.

Since:

  • 4.0.0



15
16
17
# File 'lib/kiba/extend/utils/iterative_cleanup_job_registrar.rb', line 15

def initialize
  @to_register = gather
end

Class Method Details

.callObject

Since:

  • 4.0.0



11
12
13
# File 'lib/kiba/extend/utils/iterative_cleanup_job_registrar.rb', line 11

def self.call
  new.call
end

Instance Method Details

#callObject

Since:

  • 4.0.0



19
20
21
22
23
24
# File 'lib/kiba/extend/utils/iterative_cleanup_job_registrar.rb', line 19

def call
  puts "Registering iterative cleanup jobs"
  to_register.each do |mod|
    mod.register_cleanup_jobs
  end
end