Class: Sprockets::SassCompressor

Inherits:
Object
  • Object
show all
Defined in:
lib/sassc/rails/compressor.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ SassCompressor

Returns a new instance of SassCompressor.



8
9
10
11
12
13
14
15
16
# File 'lib/sassc/rails/compressor.rb', line 8

def initialize(options = {})
  @options = {
    syntax: :scss,
    cache: false,
    read_cache: false,
    style: :compressed
  }.merge(options).freeze
  @cache_key = SecureRandom.uuid
end

Instance Method Details

#call(*args) ⇒ Object



18
19
20
# File 'lib/sassc/rails/compressor.rb', line 18

def call(*args)
  SassC::Engine.new(args[0][:data], { style: :compressed }).render
end