Skip to content

Instantly share code, notes, and snippets.

@taf2
Created October 19, 2009 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taf2/213357 to your computer and use it in GitHub Desktop.
Save taf2/213357 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'erubis'
5.times do|i|
eruby = Erubis::Eruby.new(File.read("layout.erb"))
File.open("page#{i}.html","wb") do|f|
f << eruby.evaluate({
:title => "Page #{i}",
:body => "This is the cool page #{i}"
})
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment