HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/share/rubygems-integration/all/gems/sassc-rails-2.1.2/lib/sassc/rails/compressor.rb
# frozen_string_literal: true

require 'sprockets/sass_compressor'
require 'securerandom'

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

  def call(*args)
    input = if defined?(data)
      data # sprockets 2.x
    else
      args[0][:data] #sprockets 3.x
    end

    SassC::Engine.new(
      input,
      {
        style: :compressed
      }
    ).render
  end

  # sprockets 2.x
  alias :evaluate :call
end