Skip to content

Instantly share code, notes, and snippets.

@fitzhaile
Last active December 14, 2015 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fitzhaile/5006999 to your computer and use it in GitHub Desktop.
Save fitzhaile/5006999 to your computer and use it in GitHub Desktop.
Ruby: Custom file_exists Sass Function
module Sass::Script::Functions
def file_exists(image_file)
path = Dir.getwd + "/" + image_file.value
Sass::Script::Bool.new(File.exists?(path))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment