dennybaa
6/24/2013 - 8:06 AM

erubis

erubis

require 'pry'
require 'pry-nav'
require 'erubis'

module Crap
  def juancik
    binding.pry
    "<% poop %>"
  end
end

Erubis::Context.send(:include, Crap)

template = <<-EOH

this is a template
<% binding.pry; juancik %>

EOH

eruby = Erubis::Eruby.new(template)
puts eruby.evaluate({})