class R2Template < Tilt::Template
- self.default_mime_type = 'text/css'
+ self.default_mime_type = "text/css"
def self.engine_initialized?
defined? ::R2
@output = R2.r2(data)
end
- def evaluate(scope, locals, &block)
+ def evaluate(_scope, _locals, &_block)
@output
end
end
-Rails.application.assets.register_engine ".r2", R2Template
+Rails.application.config.assets.configure do |env|
+ env.register_engine ".r2", R2Template
+end