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_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) @root = File.expand_path(root) self.cache = Cache::MemoryStore.new yield self if block_given? end