Class: Tenjin::Template

Inherits:
Object
  • Object
show all
Defined in:
lib/ramaze/view/tenjin.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) ramaze_render(binding)

This method allows us to use tenjin with a binding, so helper methods are available instead of only instance variables. The big issue with this approach is that the original Tenjin::ContextHelper is not available here. Patches welcome.



27
28
29
30
# File 'lib/ramaze/view/tenjin.rb', line 27

def ramaze_render(binding)
  code = "_buf = #{init_buf_expr}; #{@script}; _buf.to_s"
  _buf = eval(code, binding, @filename || '(tenjin)')
end