Created
May 22, 2013 17:18
-
-
Save cwoodcox/5629263 to your computer and use it in GitHub Desktop.
Sometimes I do terrible things in Ruby. Terrible, horrible, wonderful things.
This file contains hidden or 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 create_stylesheet | |
stylesheet = StringIO.new | |
stylesheet << <<-EOS | |
@font-face { | |
font-family: 'badges'; | |
src: url('#{font_eot.url}'); | |
src: url('#{font_eot.url}') format('embedded-opentype'), | |
url('#{font_woff.url}') format('woff'), | |
url('#{font_ttf.url}') format('truetype'), | |
url('#{font_svg.url}') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} | |
EOS | |
class << stylesheet | |
attr_accessor :original_filename | |
end | |
stylesheet.original_filename = 'badge_font.css' | |
self.stylesheet = stylesheet | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment