class CSSModules::Engine::RewritePostprocessor
Sprockets 2 & Sprockets 3-compatible postprocessor github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
Public Class Methods
call(input)
click to toggle source
Sprockets 3+
# File lib/css_modules/engine.rb, line 27 def self.call(input) CSSModules::Rewrite.rewrite_css(input[:data]) end
new(filename) { || ... }
click to toggle source
Sprockets 2
# File lib/css_modules/engine.rb, line 18 def initialize(filename) @source = yield end
Public Instance Methods
render(variable, empty_hash)
click to toggle source
# File lib/css_modules/engine.rb, line 22 def render(variable, empty_hash) self.class.call(data: @source) end