Module: Roadie
- Defined in:
- lib/roadie.rb,
lib/roadie/inliner.rb,
lib/roadie/version.rb,
lib/roadie/style_declaration.rb,
lib/roadie/css_file_not_found.rb,
lib/roadie/action_mailer_extensions.rb
Defined Under Namespace
Modules: ActionMailerExtensions Classes: CSSFileNotFound, Inliner, StyleDeclaration
Constant Summary collapse
- VERSION =
'1.1.2'
Class Method Summary collapse
-
.inline_css(*args) ⇒ Object
Shortcut for inlining CSS using Inliner.
-
.load_css(root, targets) ⇒ String
Tries to load the CSS “names” specified in the
targets
parameter inside theroot
path.
Class Method Details
.inline_css(*args) ⇒ Object
Shortcut for inlining CSS using Inliner
4 5 6 |
# File 'lib/roadie.rb', line 4 def self.inline_css(*args) Roadie::Inliner.new(*args).execute end |
.load_css(root, targets) ⇒ String
Tries to load the CSS “names” specified in the targets
parameter inside the root
path.
17 18 19 20 21 22 |
# File 'lib/roadie.rb', line 17 def self.load_css(root, targets) css_files_from_targets(root, targets).map do |file| raise CSSFileNotFound, file unless file.exist? file.read end.join("\n") end |