module MaintenanceTasks

The engine's namespace module. It provides isolation between the host application's code and the engine-specific code. Top-level engine constants and variables are defined under this module.

Public Class Methods

error_handler() click to toggle source

@private

# File lib/maintenance_tasks.rb, line 66
def self.error_handler
  return @error_handler if defined?(@error_handler)
  @error_handler = ->(_error, _task_context, _errored_element) {}
end
error_handler=(error_handler) click to toggle source

@private

# File lib/maintenance_tasks.rb, line 72
def self.error_handler=(error_handler)
  unless error_handler.arity == 3
    ActiveSupport::Deprecation.warn(
      "MaintenanceTasks.error_handler should be a lambda that takes three "\
       "arguments: error, task_context, and errored_element."
    )
    @error_handler = ->(error, _task_context, _errored_element) do
      error_handler.call(error)
    end
  end
  @error_handler = error_handler
end