class Sprockets::Environment
def cached
faster. This behavior is ideal in production since the file
All its file system calls are cached which makes `cached` much
Returns a cached version of the environment.
def cached CachedEnvironment.new(self) end
def find_all_linked_assets(*args, &block)
def find_all_linked_assets(*args, &block) cached.find_all_linked_assets(*args, &block) end
def find_asset(*args)
def find_asset(*args) cached.find_asset(*args) end
def initialize(root = ".")
env = Environment.new(Rails.root)
directory. This should be the same as your Rails or Rack root.
`Environment` should initialized with your application's root
def initialize(root = ".") initialize_configuration(Sprockets) self.root = root self.cache = Cache::MemoryStore.new yield self if block_given? end
def load(*args)
def load(*args) cached.load(*args) end