Guest User

Untitled

a guest
Mar 13th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. def render(template, output = template.gsub(/\.erb$/, ''))
  2. content = ERB.new(File.read(template)).result(binding)
  3. File.open(output, 'w') { |f| f.puts content }
  4. puts "Rendered #{output}."
  5. end
Add Comment
Please, Sign In to add comment