Sha256: 90f734a6c50fedbef15936d755911345a44625bff5bfadd67e0fef544748a1b9

Contents?: true

Size: 312 Bytes

Versions: 7

Compression:

Stored size: 312 Bytes

Contents

class Propshaft::Compilers::CssAssetUrls
  attr_reader :assembly

  def initialize(assembly)
    @assembly = assembly
  end

  def compile(input)
    input.gsub(/asset-path\(["']([^"')]+)["']\)/) do |match|
      %[url("#{assembly.config.prefix}/#{assembly.load_path.find($1).digested_path}")]
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
propshaft-0.1.7 lib/propshaft/compilers/css_asset_urls.rb
propshaft-0.1.6 lib/propshaft/compilers/css_asset_urls.rb
propshaft-0.1.5 lib/propshaft/compilers/css_asset_urls.rb
propshaft-0.1.4 lib/propshaft/compilers/css_asset_urls.rb
propshaft-0.1.3 lib/propshaft/compilers/css_asset_urls.rb
propshaft-0.1.2 lib/propshaft/compilers/css_asset_urls.rb
propshaft-0.1.1 lib/propshaft/compilers/css_asset_urls.rb