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

Version Path
gettalong-webgen-0.5.4.20080929 lib/webgen/contentprocessor/sass.rb
gettalong-webgen-0.5.5.20081001 lib/webgen/contentprocessor/sass.rb
gettalong-webgen-0.5.5.20081010 lib/webgen/contentprocessor/sass.rb
gettalong-webgen-0.5.5.20081012 lib/webgen/contentprocessor/sass.rb
gettalong-webgen-0.5.6.20081020 lib/webgen/contentprocessor/sass.rb
webgen-0.5.4 lib/webgen/contentprocessor/sass.rb
webgen-0.5.3 lib/webgen/contentprocessor/sass.rb
webgen-0.5.6 lib/webgen/contentprocessor/sass.rb
webgen-0.5.5 lib/webgen/contentprocessor/sass.rb