Class: Trestle::SprocketsCompressor
- Inherits:
-
Object
- Object
- Trestle::SprocketsCompressor
- Defined in:
- lib/trestle/sprockets_compressor.rb
Instance Method Summary collapse
- #call(input) ⇒ Object
-
#initialize(original_compressor, excluded_files: ["trestle/admin"]) ⇒ SprocketsCompressor
constructor
A new instance of SprocketsCompressor.
Constructor Details
#initialize(original_compressor, excluded_files: ["trestle/admin"]) ⇒ SprocketsCompressor
Returns a new instance of SprocketsCompressor.
3 4 5 6 |
# File 'lib/trestle/sprockets_compressor.rb', line 3 def initialize(original_compressor, excluded_files: ["trestle/admin"]) @original_compressor = original_compressor @excluded_files = excluded_files end |
Instance Method Details
#call(input) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/trestle/sprockets_compressor.rb', line 8 def call(input) if @excluded_files.include?(input[:name]) input[:data] else @original_compressor.call(input) end end |