Class: Zenweb::Page

Inherits:
Object
  • Object
show all
Defined in:
lib/zenweb/plugins/haml.rb

Instance Method Summary collapse

Instance Method Details

#haml(content) ⇒ Object



15
16
17
# File 'lib/zenweb/plugins/haml.rb', line 15

def haml content
  ::Haml::Engine.new(content).render
end

#render_haml(page, content) ⇒ Object

Render haml page content using Haml.



11
12
13
# File 'lib/zenweb/plugins/haml.rb', line 11

def render_haml page, content
  haml(content || page.body)
end