module Sprockets::Engines

def register_engine(ext, klass, options = {})


environment.register_engine '.coffee', CoffeeScriptTemplate

has an engine registered, it will be overridden.
Registers a new Engine `klass` for `ext`. If the `ext` already
def register_engine(ext, klass, options = {})
  ext = Sprockets::Utils.normalize_extension(ext)
  if klass.class == Sprockets::LazyProcessor || klass.respond_to?(:call)
    mutate_config(:engines) do |engines|
      engines.merge(ext => klass)
    end
    if options[:mime_type]
      mutate_config(:engine_mime_types) do |mime_types|
        mime_types.merge(ext.to_s => options[:mime_type])
      end
    end
  else
    mutate_config(:engines) do |engines|
      engines.merge(ext => LegacyTiltProcessor.new(klass))
    end
    if klass.respond_to?(:default_mime_type) && klass.default_mime_type
      mutate_config(:engine_mime_types) do |mime_types|
        mime_types.merge(ext.to_s => klass.default_mime_type)
      end
    end
  end
end

def unwrap_engines(extnames)

Returns Array of Procs.

extnames - Array of String extnames

Internal: Find and load engines by extension.
def unwrap_engines(extnames)
  extnames.map { |ext|
    engines[ext]
  }.map { |engine|
    unwrap_processor(engine)
  }
end