class Rote::Filters::Haml

Page filter that converts HAML to HTML.

Public Class Methods

new(haml_opts = {}, &block) click to toggle source

Create a new filter instance.

# File lib/rote/filters/haml.rb, line 19
def initialize(haml_opts = {}, &block)
  @haml_opts = haml_opts
  @block = block
  super()  
end

Public Instance Methods

handler(text,page) click to toggle source
# File lib/rote/filters/haml.rb, line 25
def handler(text,page)
  rc = ::Haml::Engine.new(text, @haml_opts)
  rc.to_html(page, &@block)
end