Class: Dokkit::Filter::ERB

Inherits:
Object
  • Object
show all
Defined in:
lib/dokkit/filters/erb.rb

Instance Method Summary collapse

Constructor Details

#initialize(document) ⇒ ERB

Returns a new instance of ERB.



16
17
18
# File 'lib/dokkit/filters/erb.rb', line 16

def initialize(document)
  @document = document
end

Instance Method Details

#filter(text) ⇒ Object



20
21
22
# File 'lib/dokkit/filters/erb.rb', line 20

def filter(text)
  ::ERB.new(text).result(@document.get_binding)
end