Sha256: 973b1de75be03c1afc32c87ab0a71e00c7ac4d2979f75feb9bee2f6869d01a45

Contents?: true

Size: 483 Bytes

Versions: 6

Compression:

Stored size: 483 Bytes

Contents

# Frozen-string-literal: true
# Copyright: 2012 - 2016 - MIT License
# Encoding: utf-8

module Sprockets
  class Asset

    # --
    # List all the liquid tags this asset used.
    # --
    def liquid_tags
      metadata[:liquid_tags] ||= begin
        Set.new
      end
    end


    # --
    # Pull out the data uri.
    # @return [String]
    # --
    def data_uri
      "data:#{content_type};base64,#{Rack::Utils.escape(
        Base64.encode64(to_s)
      )}"
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
jekyll-assets-2.4.0 lib/jekyll/assets/patches/sprockets/asset.rb
jekyll-assets-2.3.2 lib/jekyll/assets/patches/sprockets/asset.rb
jekyll-assets-2.3.0 lib/jekyll/assets/patches/sprockets/asset.rb
jekyll-assets-2.2.8 lib/jekyll/assets/patches/sprockets/asset.rb
jekyll-assets-2.2.7 lib/jekyll/assets/patches/sprockets/asset.rb
jekyll-assets-2.2.6 lib/jekyll/assets/patches/sprockets/asset.rb