Sha256: 4a07be61c2c862a6c2f15e0a0db365f5c08eb0ac015dcaeb3911a95ebe23e338

Contents?: true

Size: 540 Bytes

Versions: 2

Compression:

Stored size: 540 Bytes

Contents

class FailPostProcessor
  def initialize(filename, &block)
    @filename = filename
    @source   = block.call
  end

  def render(context, empty_hash_wtf)
    self.class.run(@filename, @source, context)
  end

  def self.run(filename, source, context)
    source.gsub /@import/, 'fail engine'
  end

  def self.call(input)
    filename = input[:filename]
    source   = input[:data]
    context  = input[:environment].context_class.new(input)

    result = run(filename, source, context)
    context.metadata.merge(data: result)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sprockets-sass-2.0.0.beta2 spec/support/fail_postprocessor.rb
sprockets-sass-2.0.0.beta1 spec/support/fail_postprocessor.rb