Skip to content

Instantly share code, notes, and snippets.

@jbarnette
Created December 7, 2011 23:28
Show Gist options
  • Save jbarnette/1445276 to your computer and use it in GitHub Desktop.
Save jbarnette/1445276 to your computer and use it in GitHub Desktop.
require "tilt"
class Tilt::Whirl < Tilt::Template
def evaluate scope, locals, &block
file.split(".").reverse.inject data do |input, step|
klass = Tilt[step]
klass ? klass.new(file) { input }.render(scope, locals) : input
end
end
def prepare
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment