Module: Premailer::Rails::CSSHelper
Constant Summary collapse
- STRATEGIES =
[ CSSLoaders::CacheLoader, CSSLoaders::AssetPipelineLoader, CSSLoaders::FileSystemLoader ]
Instance Attribute Summary collapse
-
#cache ⇒ Object
readonly
Returns the value of attribute cache.
Instance Method Summary collapse
-
#css_for_doc(doc) ⇒ Object
Returns all linked CSS files concatenated as string.
Instance Attribute Details
#cache ⇒ Object (readonly)
Returns the value of attribute cache.
10 11 12 |
# File 'lib/premailer/rails/css_helper.rb', line 10 def cache @cache end |
Instance Method Details
#css_for_doc(doc) ⇒ Object
Returns all linked CSS files concatenated as string.
19 20 21 22 |
# File 'lib/premailer/rails/css_helper.rb', line 19 def css_for_doc(doc) urls = css_urls_in_doc(doc) urls.map { |url| load_css(url) }.join("\n") end |