Class: Vanilla::Renderers::Erb
- Defined in:
- lib/vanilla/renderers/erb.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
6 7 8 |
# File 'lib/vanilla/renderers/erb.rb', line 6 def prepare(snip, part=:content, args=[], enclosing_snip=snip) @snip = snip end |
#process_text(content) ⇒ Object
10 11 12 |
# File 'lib/vanilla/renderers/erb.rb', line 10 def process_text(content) ERB.new(content).result(binding) end |