Sha256: 55d7c5273563a4c2e573260ac32830df237fc96eda8ecfebfeb27fbcc93e7053

Contents?: true

Size: 564 Bytes

Versions: 6

Compression:

Stored size: 564 Bytes

Contents

class << BMC
  attr_writer :parent_controller

  def parent_controller
    @parent_controller ||= [
      "ApplicationController",
      "ActionController::Base",
    ].map(&:safe_constantize).compact.first
  end

  attr_writer :parent_job

  def parent_job
    @parent_job ||= [
      "ApplicationJob",
      "ActiveJob::Base",
    ].map(&:safe_constantize).compact.first
  end

  attr_writer :parent_mailer

  def parent_mailer
    @parent_mailer ||= [
      "ApplicationMailer",
      "ActionMailer::Base",
    ].map(&:safe_constantize).compact.first
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bmc-1.3.2 lib/bmc/config.rb
bmc-1.3.1 lib/bmc/config.rb
bmc-1.3.0 lib/bmc/config.rb
bmc-1.2.1 lib/bmc/config.rb
bmc-1.2.0 lib/bmc/config.rb
bmc-1.1.0 lib/bmc/config.rb