module Ramaze::View::Erubis

View adapter for the Erubis template engine. More information about Erubis can be found here: www.kuwata-lab.com/erubis/

Constants

OPTIONS

Public Class Methods

call(action, string) click to toggle source
# File lib/ramaze/view/erubis.rb, line 14
def self.call(action, string)
  options = OPTIONS.dup
  engine = options.delete(:engine)

  eruby = View.compile(string){|s| engine.new(s, options) }
  eruby.init_evaluator(:filename => (action.view || __FILE__))
  html = eruby.evaluate(action.instance)

  return html, 'text/html'
end