Class: Dokkit::Filter::Haml
- Inherits:
-
Object
- Object
- Dokkit::Filter::Haml
- Defined in:
- lib/dokkit/filters/haml.rb
Instance Method Summary collapse
- #filter(text) ⇒ Object
-
#initialize(document) ⇒ Haml
constructor
A new instance of Haml.
Constructor Details
#initialize(document) ⇒ Haml
Returns a new instance of Haml.
20 21 22 |
# File 'lib/dokkit/filters/haml.rb', line 20 def initialize(document) @document = document end |
Instance Method Details
#filter(text) ⇒ Object
24 25 26 |
# File 'lib/dokkit/filters/haml.rb', line 24 def filter(text) ::Haml::Engine.new(text).to_html(@document.get_binding) end |