Class: Ramaze::Template::Builder
- Defined in:
- lib/ramaze/template/builder.rb
Class Method Summary collapse
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
.compile(action, template) ⇒ Object
19 20 21 22 23 |
# File 'lib/ramaze/template/builder.rb', line 19 def compile action, template "xml = ::Builder::XmlMarkup.new(:indent => 2)\n" + template + "\nxml.target!\n" end |
.transform(action) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/ramaze/template/builder.rb', line 10 def transform action if response = Response.current response['Content-Type'] = "application/xml" end template = wrap_compile(action) action.instance.instance_eval(template, action.template || __FILE__) end |