Class: Vanilla::Renderers::Erb

Inherits:
Base
  • Object
show all
Defined in:
lib/vanilla/renderers/erb.rb

Instance Attribute Summary

Attributes inherited from Base

#app

Instance Method Summary collapse

Methods inherited from Base

escape_curly_braces, #include_snips, #initialize, #parse_snip_reference, #raw_content, render, #render, #render_without_including_snips, snip_regexp, #soup

Methods included from Vanilla::Routes

#edit_link, #existing_link, #link_to, #new_link, #url_to, #url_to_raw

Constructor Details

This class inherits a constructor from Vanilla::Renderers::Base

Instance Method Details

#prepare(snip, part = :content, args = [], enclosing_snip = snip) ⇒ Object



8
9
10
# File 'lib/vanilla/renderers/erb.rb', line 8

def prepare(snip, part=:content, args=[], enclosing_snip=snip)
  @snip = snip
end

#process_text(content) ⇒ Object



12
13
14
# File 'lib/vanilla/renderers/erb.rb', line 12

def process_text(content)
  ERB.new(content).result(binding)
end