Sha256: 89a3fc4852c1843214ddcbaad3b318320e426ae3eae224b12eb1785a48db12bd

Contents?: true

Size: 688 Bytes

Versions: 22

Compression:

Stored size: 688 Bytes

Contents

# encoding: utf-8

require 'sass/script/functions'

module Sass::Script::Functions
  def asset_path(source)
    Sass::Script::String.new(ClassyAssets.asset_url_for(source.value), :string)
  end
  
  def asset_url(source)
    Sass::Script::String.new("url(\"#{ClassyAssets.asset_url_for(source.value)}\")")
  end

  def asset_data_uri(source)
    Sass::Script::String.new("url(\"#{ClassyAssets.asset_data_uri_for(source.value)}\")")
  end

  [:asset_path, :asset_url, :asset_data_uri].each do |method|
    defined?(@signatures) && @signatures.delete(method)
  end

  declare :asset_path, args: [:source]
  declare :asset_url, args: [:source]
  declare :asset_data_uri, args: [:source]
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
classy_assets-0.14.5 lib/classy_assets/sass/script/functions.rb
classy_assets-0.14.4 lib/classy_assets/sass/script/functions.rb
classy_assets-0.14.2 lib/classy_assets/sass/script/functions.rb
classy_assets-0.14.1 lib/classy_assets/sass/script/functions.rb
classy_assets-0.14.0 lib/classy_assets/sass/script/functions.rb
classy_assets-0.13.0 lib/classy_assets/sass/script/functions.rb
classy_assets-0.12.0 lib/classy_assets/sass/script/functions.rb
classy_assets-0.11.4 lib/classy_assets/sass/script/functions.rb
classy_assets-0.11.3 lib/classy_assets/sass/script/functions.rb
classy_assets-0.11.2 lib/classy_assets/sass/script/functions.rb
classy_assets-0.11.1 lib/classy_assets/sass/script/functions.rb
classy_assets-0.11.0 lib/classy_assets/sass/script/functions.rb
classy_assets-0.10.0 lib/classy_assets/sass/script/functions.rb
classy_assets-0.9.4 lib/classy_assets/sass/script/functions.rb
classy_assets-0.9.3 lib/classy_assets/sass/script/functions.rb
classy_assets-0.9.2 lib/classy_assets/sass/script/functions.rb
classy_assets-0.9.1 lib/classy_assets/sass/script/functions.rb
classy_assets-0.9.0 lib/classy_assets/sass/script/functions.rb
classy_assets-0.8.2 lib/classy_assets/sass/script/functions.rb
classy_assets-0.8.1 lib/classy_assets/sass/script/functions.rb