Sha256: aaeb5ebc96e2d286f4b24f95c5cb9061d790584dfa0a12f14516e437861a5f31

Contents?: true

Size: 490 Bytes

Versions: 2

Compression:

Stored size: 490 Bytes

Contents

module Jekyll
  module Assets
    class Context
      def initialize(context)
        patch context
      end

      def patch(what)
        what.class_eval do
          alias_method :_old_asset_path, :asset_path
          def asset_path(asset, opts = {})
            out = _old_asset_path asset
            return unless out

            environment.parent.used.add(environment.find_asset \
              resolve(asset))
          out
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jekyll-assets-2.0.0.pre.beta2 lib/jekyll/assets/context.rb
jekyll-assets-2.0.0.pre.beta1 lib/jekyll/assets/context.rb