module Sprockets::Engines

def deep_copy_hash(hash)

def deep_copy_hash(hash)
  initial = Hash.new { |h, k| h[k] = [] }
  hash.inject(initial) { |h, (k, a)| h[k] = a.dup; h }
end

def engine_extensions

# => ['.coffee', '.sass', ...]
environment.engine_extensions

Returns an `Array` of engine extension `String`s.
def engine_extensions
  @engines.keys
end

def engines(ext = nil)


# => CoffeeScriptTemplate
environment.engines('.coffee')

# => [CoffeeScriptTemplate, SassTemplate, ...]
environment.engines

register under that extension will be returned.
`Environment`. If an `ext` argument is supplied, the `Engine`
Returns an `Array` of `Engine`s registered on the
def engines(ext = nil)
  if ext
    ext = Sprockets::Utils.normalize_extension(ext)
    @engines[ext]
  else
    @engines.dup
  end
end

def register_engine(ext, klass)


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)
  ext = Sprockets::Utils.normalize_extension(ext)
  @engines[ext] = klass
end