Module: Roadie
- Defined in:
- lib/roadie.rb,
lib/roadie/inliner.rb,
lib/roadie/railtie.rb,
lib/roadie/version.rb,
lib/roadie/selector.rb,
lib/roadie/asset_provider.rb,
lib/roadie/style_declaration.rb,
lib/roadie/css_file_not_found.rb,
lib/roadie/filesystem_provider.rb,
lib/roadie/asset_pipeline_provider.rb,
lib/roadie/action_mailer_extensions.rb
Defined Under Namespace
Modules: ActionMailerExtensions Classes: AssetPipelineProvider, AssetProvider, CSSFileNotFound, FilesystemProvider, Inliner, Railtie, Selector, StyleDeclaration
Constant Summary collapse
- VERSION =
'2.4.1'
Class Method Summary collapse
-
.after_inlining_handler ⇒ Object
Returns the value of
config.roadie.after_inlining. -
.app ⇒ Object
Shortcut to Rails.application.
-
.current_provider ⇒ Object
Returns the active provider.
-
.enabled? ⇒ Boolean
Returns the value of
config.roadie.enabled. -
.inline_css(*args) ⇒ Object
Shortcut for inlining CSS using Inliner.
-
.providers ⇒ Object
Returns all available providers.
Class Method Details
.after_inlining_handler ⇒ Object
Returns the value of config.roadie.after_inlining
50 51 52 |
# File 'lib/roadie.rb', line 50 def after_inlining_handler config.roadie.after_inlining end |
.app ⇒ Object
Shortcut to Rails.application
10 11 12 |
# File 'lib/roadie.rb', line 10 def app Rails.application end |
.current_provider ⇒ Object
Returns the active provider
If no provider has been configured a new provider will be instantiated depending on if the asset pipeline is enabled or not.
If config.assets.enabled is true, the AssetPipelineProvider will be used while FilesystemProvider will be used if it is set to false.
38 39 40 41 42 43 44 45 46 |
# File 'lib/roadie.rb', line 38 def current_provider return config.roadie.provider if config.roadie.provider if assets_enabled? AssetPipelineProvider.new else FilesystemProvider.new end end |
.enabled? ⇒ Boolean
Returns the value of config.roadie.enabled.
Roadie will disable all processing if this config is set to false. If you just want to disable CSS inlining without disabling the rest of Roadie, pass css: nil to the defaults method inside your mailers.
24 25 26 |
# File 'lib/roadie.rb', line 24 def enabled? config.roadie.enabled end |
.inline_css(*args) ⇒ Object
Shortcut for inlining CSS using Inliner
5 6 7 |
# File 'lib/roadie.rb', line 5 def inline_css(*args) Roadie::Inliner.new(*args).execute end |
.providers ⇒ Object
Returns all available providers
15 16 17 |
# File 'lib/roadie.rb', line 15 def providers [AssetPipelineProvider, FilesystemProvider] end |