Module: WithEmbeddedAssets
- Defined in:
- lib/with_embedded_assets.rb,
lib/with_embedded_assets/railtie.rb,
lib/with_embedded_assets/version.rb
Overview
This module handles the activation of embedding assets.
Defined Under Namespace
Modules: Mixin, ViewHelpers Classes: Processor, Railtie
Constant Summary collapse
- VERSION =
The current version of the gem.
"0.1.0"
Class Method Summary collapse
-
.enabled ⇒ Boolean
(also: enabled?)
Checks if the automatic embedding of assets is active.
-
.enabled=(value) ⇒ Object
Sets the automatic embedding of assets on or off.
Class Method Details
.enabled ⇒ Boolean Also known as: enabled?
Checks if the automatic embedding of assets is active.
8 9 10 |
# File 'lib/with_embedded_assets.rb', line 8 def enabled !!Thread.current[THREAD_VARIABLE_KEY] end |
.enabled=(value) ⇒ Object
Sets the automatic embedding of assets on or off.
16 17 18 |
# File 'lib/with_embedded_assets.rb', line 16 def enabled=(value) Thread.current[THREAD_VARIABLE_KEY] = !!value end |