Sha256: 71c695d5738128c4f842f1764a271c14d753d9fcecc6458bd0fc36cb5368439f

Contents?: true

Size: 564 Bytes

Versions: 12

Compression:

Stored size: 564 Bytes

Contents

require 'sass'

require 'compass'

module Awestruct
  module Sassable

    def render(context)
      sass_opts = Compass.sass_engine_options
      sass_opts[:load_paths] ||= []
      Compass::Frameworks::ALL.each do |framework|
        sass_opts[:load_paths] << framework.stylesheets_directory
      end
      sass_opts[:load_paths] << File.dirname( self.source_path ) 
      sass_opts[:syntax] = syntax()
      sass_engine = Sass::Engine.new( raw_page_content, sass_opts )
      sass_engine.render
    end

    def output_extension
      'css'
    end

  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
awestruct-0.1.9 lib/awestruct/sassable.rb
awestruct-0.1.8 lib/awestruct/sassable.rb
awestruct-0.1.7 lib/awestruct/sassable.rb
awestruct-0.1.6 lib/awestruct/sassable.rb
awestruct-0.1.5 lib/awestruct/sassable.rb
awestruct-0.1.4 lib/awestruct/sassable.rb
awestruct-0.1.3 lib/awestruct/sassable.rb
awestruct-0.1.2 lib/awestruct/sassable.rb
awestruct-0.1.1 lib/awestruct/sassable.rb
awestruct-0.1.0 lib/awestruct/sassable.rb
awestruct-0.0.9 lib/awestruct/sassable.rb
awestruct-0.0.8 lib/awestruct/sassable.rb