Module: Roadie
- Defined in:
- lib/roadie.rb,
lib/roadie/railtie.rb,
lib/roadie/version.rb,
lib/roadie/inliner.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
- VERSION =
'2.3.4'
Class Method Summary (collapse)
-
+ (Object) app
Shortcut to Rails.application.
-
+ (Object) current_provider
Returns the active provider.
-
+ (Boolean) enabled?
Returns the value of config.roadie.enabled.
-
+ (Object) inline_css(*args)
Shortcut for inlining CSS using Inliner.
-
+ (Object) providers
Returns all available providers.
Class Method Details
+ (Object) app
Shortcut to Rails.application
10 11 12 |
# File 'lib/roadie.rb', line 10 def app Rails.application end |
+ (Object) current_provider
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 config.respond_to?(:assets) and config.assets and config.assets.enabled AssetPipelineProvider.new else FilesystemProvider.new end end |
+ (Boolean) enabled?
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 |
+ (Object) inline_css(*args)
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 |
+ (Object) providers
Returns all available providers
15 16 17 |
# File 'lib/roadie.rb', line 15 def providers [AssetPipelineProvider, FilesystemProvider] end |