Module: Jekyll::Assets::Patches::CachedEnv
- Includes:
- Utils
- Included in:
- Sprockets::CachedEnvironment
- Defined in:
- lib/jekyll/assets/patches/cached.rb
Overview
--
Patches Sprockets::CachedEnvironment with some of
the stuff that we would like available. Including our
Util methods, the #manifest, the #asset_config,
and even #jekyll, so that we can remain fast while
having some of the stuff that we need access to.
Instance Attribute Summary collapse
-
#asset_config ⇒ Object
readonly
Returns the value of attribute asset_config.
-
#jekyll ⇒ Object
readonly
Returns the value of attribute jekyll.
-
#manifest ⇒ Object
readonly
--.
Instance Method Summary collapse
-
#find_asset ⇒ Object
--.
-
#find_asset!(*a) ⇒ Object
--.
-
#initialize(env) ⇒ self
-- Patches initialize so we can give access to
#jekyll.
Methods included from Utils
activate, #external?, #external_asset, #find_assets_by_glob, #glob_paths, html, html_fragment, #in_cache_dir, #in_dest_dir, javascript?, make_https, manifest_files, new_uglifier?, old_sprockets?, #parse_liquid, #prefix_url, #raw_precompiles, #strip_paths, strip_secondary_content_type, strip_slashes, #url_asset, xml
Instance Attribute Details
#asset_config ⇒ Object (readonly)
Returns the value of attribute asset_config.
22 23 24 |
# File 'lib/jekyll/assets/patches/cached.rb', line 22 def asset_config @asset_config end |
#jekyll ⇒ Object (readonly)
Returns the value of attribute jekyll.
23 24 25 |
# File 'lib/jekyll/assets/patches/cached.rb', line 23 def jekyll @jekyll end |
#manifest ⇒ Object (readonly)
--
21 22 23 |
# File 'lib/jekyll/assets/patches/cached.rb', line 21 def manifest @manifest end |
Instance Method Details
#find_asset ⇒ Object
--
39 40 41 42 43 |
# File 'lib/jekyll/assets/patches/cached.rb', line 39 def find_asset(*) super.tap do |v| v&.environment = self end end |
#find_asset!(*a) ⇒ Object
--
46 47 48 49 50 |
# File 'lib/jekyll/assets/patches/cached.rb', line 46 def find_asset!(*a) load(resolve!(*a).first).tap do |v| v.environment = self end end |
#initialize(env) ⇒ self
--
Patches initialize so we can give access to #jekyll.
30 31 32 33 34 35 36 |
# File 'lib/jekyll/assets/patches/cached.rb', line 30 def initialize(env) super @manifest = env.manifest @asset_config = env.asset_config @jekyll = env.jekyll end |