Sha256: 37431f7ca36a9916c36db96794c1f83accb5331ff8fa8f0fd0d2356ac6445ffd
Contents?: true
Size: 687 Bytes
Versions: 4
Compression:
Stored size: 687 Bytes
Contents
# -*- encoding: utf-8 -*- module Webgen::ContentProcessor # Processes content in sassy CSS markup (used for writing CSS files) using the +haml+ library. class Scss # Convert the content in +scss+ markup to CSS. def call(context) require 'sass' context.content = ::Sass::Engine.new(context.content, :filename => context.ref_node.alcn, :syntax => :scss).render context rescue LoadError raise Webgen::LoadError.new('sass', self.class.name, context.dest_node, 'haml') rescue ::Sass::SyntaxError => e raise Webgen::RenderError.new(e, self.class.name, context.dest_node, context.ref_node, (e.sass_line if e.sass_line)) end end end
Version data entries
4 entries across 4 versions & 1 rubygems