Sha256: 25bc4f1450e5150acbdb65803eef8a61e37cb5f07ccb2ca6bbcfe1240d788acf
Contents?: true
Size: 617 Bytes
Versions: 13
Compression:
Stored size: 617 Bytes
Contents
require 'tilt' module Sprockets # `Processor` creates an anonymous processor class from a block. # # register_preprocessor 'text/css', :my_processor do |context, data| # # ... # end # class Processor < Tilt::Template # `processor` is a lambda or block def self.processor @processor end def self.name "Sprockets::Processor (#{@name})" end def self.to_s name end def prepare end # Call processor block with `context` and `data`. def evaluate(context, locals) self.class.processor.call(context, data) end end end
Version data entries
13 entries across 13 versions & 4 rubygems