Class: Vanilla::Renderers::Haml
- Defined in:
- lib/vanilla/renderers/haml.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #prepare(snip, part = :content, args = [], enclosing_snip = snip) ⇒ Object
- #process_text(content) ⇒ Object
Methods inherited from Base
#default_layout_snip, escape_curly_braces, #include_snips, #initialize, #layout_for, #link_to, #parse_snip_reference, #raw_content, #render, render, #render_missing_snip, #render_without_including_snips, snip_regexp, #soup, #url_to
Constructor Details
This class inherits a constructor from Vanilla::Renderers::Base
Instance Method Details
#prepare(snip, part = :content, args = [], enclosing_snip = snip) ⇒ Object
5 6 7 |
# File 'lib/vanilla/renderers/haml.rb', line 5 def prepare(snip, part=:content, args=[], enclosing_snip=snip) @snip = snip end |
#process_text(content) ⇒ Object
9 10 11 |
# File 'lib/vanilla/renderers/haml.rb', line 9 def process_text(content) ::Haml::Engine.new(content).render(binding) end |