Module: PremailerRails::CSSHelper
Constant Summary collapse
- STRATEGIES =
[ CSSLoaders::CacheLoader, CSSLoaders::HassleLoader, 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.
9 10 11 |
# File 'lib/premailer-rails3/css_helper.rb', line 9 def cache @cache end |
Instance Method Details
#css_for_doc(doc) ⇒ Object
Returns all linked CSS files concatenated as string.
19 20 21 22 23 24 25 26 |
# File 'lib/premailer-rails3/css_helper.rb', line 19 def css_for_doc(doc) urls = css_urls_in_doc(doc) if urls.empty? load_css(:default) unless has_inline_css? doc else urls.map { |url| load_css(url) }.join("\n") end end |