Module: Orange::Pulp::Template
- Defined in:
- lib/orange-core/middleware/template.rb
Instance Method Summary collapse
Instance Method Details
#layout(name) ⇒ Object
52 53 54 |
# File 'lib/orange-core/middleware/template.rb', line 52 def layout(name) template(name) end |
#template(name) ⇒ Object
47 48 49 50 51 |
# File 'lib/orange-core/middleware/template.rb', line 47 def template(name) name = name.to_s if name.kind_of?(Symbol) name = name + ".haml" unless name =~ /\.haml$/ packet['template.file'] == name end |
#wrap ⇒ Object
42 43 44 45 46 |
# File 'lib/orange-core/middleware/template.rb', line 42 def wrap packet[:content] = orange[:parser].haml(packet['template.file'], packet, :wrapped_content => packet[:content], :template => true) do content end end |