class Sprockets::LegacyTiltProcessor
Deprecated: Wraps legacy engine and process Tilt templates with new processor call signature.
Will be removed in Sprockets 4.x.
LegacyTiltProcessor.new(Tilt::CoffeeScriptProcessor)
Public Class Methods
new(klass)
click to toggle source
# File lib/sprockets/legacy_tilt_processor.rb, line 12 def initialize(klass) @klass = klass end
Public Instance Methods
__getobj__()
click to toggle source
# File lib/sprockets/legacy_tilt_processor.rb, line 16 def __getobj__ @klass end
call(input)
click to toggle source
# File lib/sprockets/legacy_tilt_processor.rb, line 20 def call(input) filename = input[:filename] data = input[:data] context = input[:environment].context_class.new(input) data = @klass.new(filename) { data }.render(context) context.metadata.merge(data: data.to_str) end