Module: Webgen::ContentProcessor::Haml
- Defined in:
- lib/webgen/content_processor/haml.rb
Overview
Processes content in Haml markup using the haml
library.
Class Method Summary collapse
-
.call(context) ⇒ Object
Convert the content in
haml
markup to HTML.
Class Method Details
.call(context) ⇒ Object
Convert the content in haml
markup to HTML.
13 14 15 16 17 18 19 20 |
# File 'lib/webgen/content_processor/haml.rb', line 13 def self.call(context) context.content = ::Haml::Engine.new(context.content, :filename => context.ref_node.alcn). render(Object.new, :context => context) context rescue ::Haml::Error => e line = (e.line ? e.line + 1 : Webgen::Error.error_line(e)) raise Webgen::RenderError.new(e, 'content_processor.haml', context.dest_node, nil, line) end |