Skip to content

Instantly share code, notes, and snippets.

@Gatix
Last active January 3, 2016 10:59
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 Gatix/8452907 to your computer and use it in GitHub Desktop.
Save Gatix/8452907 to your computer and use it in GitHub Desktop.
Inline SVG helper
def inline_svg(path)
real_path = path
real_path = File.join(images_dir, real_path) unless real_path.start_with?('/')
full_path = File.join(source_dir, real_path)
file = File.open(full_path, "rb")
file.read
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment