Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def render(template, output = template.gsub(/\.erb$/, ''))
- content = ERB.new(File.read(template)).result(binding)
- File.open(output, 'w') { |f| f.puts content }
- puts "Rendered #{output}."
- end
Add Comment
Please, Sign In to add comment