Last active
January 3, 2016 10:59
-
-
Save Gatix/8452907 to your computer and use it in GitHub Desktop.
Inline SVG helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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