Class: Baren::PossibleBinaryDirectiveProcessor

Inherits:
Sprockets::DirectiveProcessor
  • Object
show all
Defined in:
lib/baren.rb

Overview

workaround for the problem about Sprockets::DirectiveProcessor parsing binary (png)

Instance Method Summary collapse

Instance Method Details

#evaluate(context, locals, &block) ⇒ Object



60
61
62
63
64
65
66
# File 'lib/baren.rb', line 60

def evaluate(context, locals, &block)
  if @directive_parser
    super
  else
    data
  end
end

#prepareObject



54
55
56
57
58
# File 'lib/baren.rb', line 54

def prepare
  if !data.respond_to?(:valid_encoding?) || data.valid_encoding?
    super
  end
end