class Sprockets::AutoloadProcessor

CoffeeScript that may not be available in the gem environment.
internally by Sprockets since it has optionally dependencies such as
Libraries should not use lazily loaded processors. They are only needed
Internal: Used for lazy loading processors.

def cache_key

Delegate to processor#cache_key
def cache_key
  load_processor.cache_key if load_processor.respond_to?(:cache_key)
end

def call(*args)

Delegate to processor#call
def call(*args)
  load_processor.call(*args)
end

def const_loaded?

Returns Boolean.

Check if target constant is already loaded.
def const_loaded?
  @mod.autoload?(@name)
end

def initialize(mod, name)

name - Symbol name of processor class/module
mod - Parent Module of processor class/module

See ProcessorUtils.autoload_processor for constructor method.

Initialize AutoloadProcessor wrapper
def initialize(mod, name)
  @mod  = mod
  @name = name.to_sym
end

def load_processor

def load_processor
  @processor ||= @mod.const_get(@name)
end

def name

Returns String.

Full name of module.
def name
  "#{@mod}::#{@name}"
end