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, #raw_content, render, #render, #render_without_including_snips, snip_regexp

Constructor Details

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

Instance Method Details

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



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

def prepare(snip, part=:content, args=[])
  @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