Module: Compass::SlickmapImage

Included in:
Sass::Script::Functions
Defined in:
lib/slickmap.rb

Instance Method Summary collapse

Instance Method Details

#slickmap_image(path, mime_type = nil) ⇒ Object



5
6
7
8
9
10
# File 'lib/slickmap.rb', line 5

def slickmap_image(path, mime_type = nil)
  path = path.value
  real_path = File.join(File.dirname(__FILE__), "..", "templates", "project", "images", path)
  url = "url('data:#{compute_mime_type(path,mime_type)};base64,#{data(real_path)}')"
  Sass::Script::String.new(url)
end