Sha256: 08b1e204a01df9f5a7acb522001cef562905bd3ee28b1676e6ae50ee25e5a7d5

Contents?: true

Size: 647 Bytes

Versions: 2

Compression:

Stored size: 647 Bytes

Contents

require 'sass'

require 'compass'

module Awestruct
  module Sassable

    def render(context)
      #sass_opts = {
        #:load_paths => [
          #File.dirname( self.source_path ),
          #Compass::Frameworks['compass'].stylesheets_directory,
          #Compass::Frameworks['blueprint'].stylesheets_directory,
        #],
      #}
      sass_opts = Compass.sass_engine_options
      sass_opts[:load_paths] ||= []
      sass_opts[:load_paths] << File.dirname( self.source_path ) 

      sass_engine = Sass::Engine.new( raw_page_content, sass_opts )
      sass_engine.render
    end

    def output_extension
      'css'
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
awestruct-0.0.6 lib/awestruct/sassable.rb
awestruct-0.0.5 lib/awestruct/sassable.rb