Sha256: 908ea06f577e999d0c92fc08f23325a1d777ccf2569f6fa3c9e1b3c0a16dccaa
Contents?: true
Size: 534 Bytes
Versions: 9
Compression:
Stored size: 534 Bytes
Contents
module Webgen::ContentProcessor # Processes content in Sass markup (used for writing CSS files) using the +haml+ library. class Sass # Convert the content in +sass+ markup to CSS. def call(context) require 'sass' context.content = ::Sass::Engine.new(context.content, :filename => context.ref_node.absolute_lcn).render context rescue Exception => e raise RuntimeError, "Error converting Sass markup to CSS in <#{context.ref_node.absolute_lcn}>: #{e.message}", e.backtrace end end end
Version data entries
9 entries across 9 versions & 2 rubygems