Module: Ramaze::View::Erubis
- Defined in:
- lib/ramaze/view/erubis.rb
Constant Summary collapse
- OPTIONS =
{ :engine => ::Erubis::Eruby }
Class Method Summary collapse
Class Method Details
.call(action, string) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ramaze/view/erubis.rb', line 11 def self.call(action, string) = OPTIONS.dup engine = .delete(:engine) eruby = View.compile(string){|s| engine.new(s, ) } eruby.init_evaluator(:filename => (action.view || __FILE__)) html = eruby.evaluate(action.instance) return html, 'text/html' end |