Sha256: 26596ef5139cfc748c83ec4f515f6df8632d6ff9fb27541a485be64d4a53e568

Contents?: true

Size: 687 Bytes

Versions: 16

Compression:

Stored size: 687 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, 'content_processor.scss', context.dest_node, nil, (e.sass_line if e.sass_line))
      end

    end

  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
webgen-1.7.3 lib/webgen/content_processor/scss.rb
webgen-1.7.2 lib/webgen/content_processor/scss.rb
webgen-1.7.1 lib/webgen/content_processor/scss.rb
webgen-1.7.0 lib/webgen/content_processor/scss.rb
webgen-1.6.0 lib/webgen/content_processor/scss.rb
webgen-1.5.2 lib/webgen/content_processor/scss.rb
webgen-1.5.1 lib/webgen/content_processor/scss.rb
webgen-1.5.0 lib/webgen/content_processor/scss.rb
webgen-1.4.1 lib/webgen/content_processor/scss.rb
webgen-1.4.0 lib/webgen/content_processor/scss.rb
webgen-1.3.0 lib/webgen/content_processor/scss.rb
webgen-1.2.1 lib/webgen/content_processor/scss.rb
webgen-1.2.0 lib/webgen/content_processor/scss.rb
webgen-1.1.0 lib/webgen/content_processor/scss.rb
webgen-1.0.0 lib/webgen/content_processor/scss.rb
webgen-1.0.0.beta3 lib/webgen/content_processor/scss.rb