Sha256: 33034e4187b2db461132ab6c32a034ba1f6c7c7f0408fb960d2f6c9f7cc0cfb8

Contents?: true

Size: 551 Bytes

Versions: 5

Compression:

Stored size: 551 Bytes

Contents

module Rail
  module Processor
    class Sass < Base
      def self.input_extension
        'scss'
      end

      def self.output_extension
        'css'
      end

      def self.mime_type
        'text/css'
      end

      def compile(filename, options = {})
        options = {
          filename: filename,
          line: 1,
          syntax: :scss,
          style: compress? ? :compressed : :nested
        }.merge(options)

        engine = ::Sass::Engine.new(File.read(filename), options)
        engine.render
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rail-0.1.1 lib/rail/processor/sass.rb
rail-0.1.0 lib/rail/processor/sass.rb
rail-0.0.8 lib/rail/processor/sass.rb
rail-0.0.7 lib/rail/processor/sass.rb
rail-0.0.6 lib/rail/processor/sass.rb