class Marten::Asset::Engine
- Marten::Asset::Engine
- Reference
- Object
Overview
Represents an assets engine.
An assets engine holds a storage to collect, persist and resolve asset URLs, as well as finders to discover the assets to collect.
Defined in:
marten/asset/engine.crConstructors
Instance Method Summary
-
#find(filepath : String) : String
Returns the absolute path corresponding to the passed asset file path.
- #finders : Array(Marten::Asset::Finder::Base)
- #finders=(finders : Array(Marten::Asset::Finder::Base))
- #manifests : Array(String)
- #manifests=(manifests : Array(String))
- #storage : Marten::Core::Storage::Base
-
#url(filepath : String) : String
Returns the URL associated with the passed file name or file path.
Constructor Detail
Instance Method Detail
def find(filepath : String) : String
#
Returns the absolute path corresponding to the passed asset file path.
def url(filepath : String) : String
#
Returns the URL associated with the passed file name or file path.
If manifests are configured, those will be used in order to try to map the passed filepath
to a real file path
that is fingerprinted. The passed filepath
will be used as is if it is not present in the configured manifests
(or if there are no configured manifests at all).