Module: PremailerRails::CSSLoaders::FileSystemLoader

Extended by:
FileSystemLoader
Included in:
FileSystemLoader
Defined in:
lib/premailer-rails3/css_loaders.rb

Overview

Loads the CSS from the file system.

Instance Method Summary collapse

Instance Method Details

#load(path) ⇒ Object



82
83
84
# File 'lib/premailer-rails3/css_loaders.rb', line 82

def load(path)
  File.read("#{Rails.root}/public#{normalized_path(path)}")
end

#normalized_path(path) ⇒ Object



86
87
88
# File 'lib/premailer-rails3/css_loaders.rb', line 86

def normalized_path(path)
  path == :default ? '/stylesheets/email.css' : path
end