Class: Dokkit::Filter::ERB
- Inherits:
-
Object
- Object
- Dokkit::Filter::ERB
- Defined in:
- lib/dokkit/filters/erb.rb
Instance Method Summary collapse
- #filter(text) ⇒ Object
-
#initialize(document) ⇒ ERB
constructor
A new instance of ERB.
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 |