Sha256: e09da948961e6bdca6c391f1e9aa7b14af1a0bbcf923403b2e698c3f65cccfab
Contents?: true
Size: 561 Bytes
Versions: 5
Compression:
Stored size: 561 Bytes
Contents
# -*- encoding: utf-8 -*- 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
5 entries across 5 versions & 3 rubygems