Module: Premailer::Rails

Defined in:
lib/premailer/rails.rb,
lib/premailer/rails/hook.rb,
lib/premailer/rails/railtie.rb,
lib/premailer/rails/version.rb,
lib/premailer/rails/css_helper.rb,
lib/premailer/rails/customized_premailer.rb,
lib/premailer/rails/css_loaders/network_loader.rb,
lib/premailer/rails/css_loaders/propshaft_loader.rb,
lib/premailer/rails/css_loaders/file_system_loader.rb,
lib/premailer/rails/css_loaders/asset_pipeline_loader.rb

Defined Under Namespace

Modules: CSSHelper, CSSLoaders Classes: CustomizedPremailer, Hook, Railtie

Constant Summary collapse

VERSION =
File.read(
  File.expand_path('../../../../VERSION', __FILE__)
).strip

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject

Returns the value of attribute config.



18
19
20
# File 'lib/premailer/rails.rb', line 18

def config
  @config
end

Class Method Details

.register_interceptorsObject



21
22
23
24
25
26
27
# File 'lib/premailer/rails.rb', line 21

def self.register_interceptors
  ActionMailer::Base.register_interceptor(Premailer::Rails::Hook)

  if ActionMailer::Base.respond_to?(:register_preview_interceptor)
    ActionMailer::Base.register_preview_interceptor(Premailer::Rails::Hook)
  end
end