Sha256: cda915b81ca7b3317e7962421e6b52dc899417aedb567ad1f379d274183155df

Contents?: true

Size: 678 Bytes

Versions: 2

Compression:

Stored size: 678 Bytes

Contents

# -*- encoding: utf-8 -*-

require 'webgen/content_processor/sass'

module Webgen
  class ContentProcessor

    # Processes content in sassy CSS markup (used for writing CSS files) using the +sass+ library.
    module Scss

      # Convert the content in +scss+ markup to CSS.
      def self.call(context)
        options = Webgen::ContentProcessor::Sass.default_options(context).merge(:syntax => :scss)
        context.content = ::Sass::Engine.new(context.content, options).render
        context
      rescue ::Sass::SyntaxError => e
        raise Webgen::RenderError.new(e, self.class.name, context.dest_node, nil, (e.sass_line if e.sass_line))
      end

    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
webgen-1.0.0.beta2 lib/webgen/content_processor/scss.rb
webgen-1.0.0.beta1 lib/webgen/content_processor/scss.rb