Class: Tenjin::Template
Instance Method Summary collapse
-
#ramaze_render(binding) ⇒ Object
This method allows us to use tenjin with a binding, so helper methods are available instead of only instance variables.
Instance Method Details
#ramaze_render(binding) ⇒ Object
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.
24 25 26 27 |
# File 'lib/ramaze/view/tenjin.rb', line 24 def ramaze_render(binding) code = "_buf = #{init_buf_expr}; #{@script}; _buf.to_s" _buf = binding.eval(code, @filename || '(tenjin)') end |