Class: Ramaze::Template::Remarkably
- Defined in:
- lib/ramaze/template/remarkably.rb
Overview
Is responsible for compiling a template using the Remarkably templating engine. Can be found at: rubyforge.org/projects/remarkably
Class Method Summary collapse
-
.transform(action) ⇒ Object
Entry point for Action#render.
-
.transform_string(string, action) ⇒ Object
Takes a string and action, sets args to action.args and then proceeds to instance_eval the string inside the action.instance.
Methods inherited from Template
caching_compile, reaction_or_file, render_method, result_and_file, wrap_compile
Methods included from Helper::Methods
extend_object, #helper, included
Class Method Details
.transform(action) ⇒ Object
Entry point for Action#render
19 20 21 22 23 24 |
# File 'lib/ramaze/template/remarkably.rb', line 19 def transform action result, file = result_and_file(action) result = transform_string(file, action) if file result.to_s end |
.transform_string(string, action) ⇒ Object
Takes a string and action, sets args to action.args and then proceeds to instance_eval the string inside the action.instance
29 30 31 32 33 34 |
# File 'lib/ramaze/template/remarkably.rb', line 29 def transform_string(string, action) action.instance.instance_eval do args = action.params instance_eval(string) end end |