Temple::Engine::ERB.rock!

25 views
Skip to first unread message

Magnus Holm

unread,
Feb 19, 2010, 5:03:13 PM2/19/10
to guardians-o...@googlegroups.com
Temple::Parsers::ERB now uses ERB::Compiler which means it parses all templates exactly the same way as erb.rb in stdlib.

I've also added Engine::ERB which behaves exactly the same way as the ERB-class, and the rock! method injects itself as the ERB-class:

# Just prepend this to a file that uses ERB and it now uses Temple (w/ optimizations) instead.
require 'temple'
Temple::Engine::ERB.rock!

Should be on par with Erubis::Eruby, but still seems a little slower than Erubis::FastEruby. Yes, I'm working on it :-)

// Magnus Holm
Reply all
Reply to author
Forward
0 new messages