Skip to content

Instantly share code, notes, and snippets.

@gimite
Created December 5, 2010 05:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gimite/728823 to your computer and use it in GitHub Desktop.
Save gimite/728823 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# coding: utf-8
require "rubygems"
require "tilt"
require "tempfile"
f = Tempfile.open("template")
f.puts('<%# coding: UTF-8 %>')
f.puts('ふが <%= @hoge %>')
f.close()
@hoge = "ほげ"
puts(Tilt['erb'].new(f.path).render(self))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment