Sha256: bb8c5f86537ec23bf01934fc28348bb7531042b93a085cb5845d3e9398ceb8fd

Contents?: true

Size: 529 Bytes

Versions: 1

Compression:

Stored size: 529 Bytes

Contents

# stdlib
require "set"


module Jekyll
  module AssetsPlugin
    module Patches
      module ContextPatch

        def site
          self.class.instance_variable_get :@site
        end


        def jekyll_assets
          @jekyll_assets ||= Set.new
        end


        def asset_path path, *args
          jekyll_assets << resolve(path.to_s[/^[^#?]+/]).to_s
          site.asset_path path, *args
        rescue Sprockets::FileNotFound
          raise Environment::AssetNotFound, path
        end

      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jekyll-assets-0.6.1 lib/jekyll/assets_plugin/patches/context_patch.rb