Module: Jekyll::AssetsPlugin::Patches::IndexPatch
- Defined in:
- lib/jekyll/assets_plugin/patches/index_patch.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/jekyll/assets_plugin/patches/index_patch.rb', line 8 def self.included(base) base.class_eval do alias_method :__orig_find_asset, :find_asset alias_method :find_asset, :__wrap_find_asset end end |
Instance Method Details
#__wrap_find_asset(path, options = {}) ⇒ Object
15 16 17 18 19 |
# File 'lib/jekyll/assets_plugin/patches/index_patch.rb', line 15 def __wrap_find_asset(path, = {}) __orig_find_asset(path, ).tap do |asset| asset.instance_variable_set :@site, @environment.site if asset end end |