Module: Dassets
- Defined in:
- lib/dassets/server.rb,
lib/dassets.rb,
lib/dassets/cache.rb,
lib/dassets/config.rb,
lib/dassets/engine.rb,
lib/dassets/source.rb,
lib/dassets/version.rb,
lib/dassets/asset_file.rb,
lib/dassets/file_store.rb,
lib/dassets/source_file.rb,
lib/dassets/source_proxy.rb,
lib/dassets/server/request.rb,
lib/dassets/server/response.rb
Overview
Rack middleware for serving Dassets asset files
Defined Under Namespace
Modules: Cache, SourceList
Classes: AssetFile, Config, Engine, FileStore, NullEngine, NullSourceFile, Server, Source, SourceFile, SourceProxy
Constant Summary
collapse
- VERSION =
"0.13.2"
Class Method Summary
collapse
Class Method Details
.[](digest_path) ⇒ Object
16
17
18
|
# File 'lib/dassets.rb', line 16
def self.[](digest_path)
@asset_files[digest_path] ||= AssetFile.new(digest_path)
end
|
.config ⇒ Object
7
|
# File 'lib/dassets.rb', line 7
def self.config; @config ||= Config.new; end
|
8
9
10
|
# File 'lib/dassets.rb', line 8
def self.configure(&block)
block.call(self.config)
end
|
.init ⇒ Object
12
13
14
|
# File 'lib/dassets.rb', line 12
def self.init
@asset_files ||= {}
end
|
.source_list ⇒ Object
20
21
22
|
# File 'lib/dassets.rb', line 20
def self.source_list
SourceList.new(self.config.sources)
end
|