Class: Sprockets::LegacyTiltProcessor
- Inherits:
-
Delegator
- Object
- Delegator
- Sprockets::LegacyTiltProcessor
- Defined in:
- lib/sprockets/legacy_tilt_processor.rb
Overview
Deprecated: Wraps legacy engine and process Tilt templates with new processor call signature.
Will be removed in Sprockets 4.x.
LegacyTiltProcessor.new(Tilt::CoffeeScriptProcessor)
Instance Method Summary collapse
- #__getobj__ ⇒ Object
- #call(input) ⇒ Object
-
#initialize(klass) ⇒ LegacyTiltProcessor
constructor
A new instance of LegacyTiltProcessor.
Constructor Details
#initialize(klass) ⇒ LegacyTiltProcessor
Returns a new instance of LegacyTiltProcessor.
12 13 14 |
# File 'lib/sprockets/legacy_tilt_processor.rb', line 12 def initialize(klass) @klass = klass end |
Instance Method Details
#__getobj__ ⇒ Object
16 17 18 |
# File 'lib/sprockets/legacy_tilt_processor.rb', line 16 def __getobj__ @klass end |
#call(input) ⇒ Object
20 21 22 23 24 25 26 27 |
# 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..merge(data: data.to_str) end |