Class: Dokkit::Filter::Haml

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

Instance Method Summary collapse

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