Module: Roadie
- Defined in:
- lib/roadie.rb,
lib/roadie/inliner.rb,
lib/roadie/railtie.rb,
lib/roadie/version.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, StyleDeclaration
Constant Summary collapse
- VERSION =
'2.3.0'
Class Method Summary collapse
-
.app ⇒ Object
Shortcut to Rails.application.
-
.current_provider ⇒ Object
Returns the active provider.
-
.inline_css(*args) ⇒ Object
Shortcut for inlining CSS using Inliner.
-
.providers ⇒ Object
Returns all available providers.
Class Method Details
.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
.
29 30 31 32 33 34 35 36 37 |
# File 'lib/roadie.rb', line 29 def current_provider return config.roadie.provider if config.roadie.provider if config.assets.enabled AssetPipelineProvider.new else FilesystemProvider.new end 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 |