class Marten::Template::Tag::Asset
- Marten::Template::Tag::Asset
- Marten::Template::Tag::Base
- Reference
- Object
Overview
The asset
template tag.
The asset
template tag allows to generate the URL of a given asset. It must be take one argument (the filepath
of the asset).
For example the following line is a valid usage of the asset
tag:
{% asset "app/app.css" %}
Optionally, resolved asset URLs can be assigned to a specific variable using the as
keyword:
{% asset "app/app.css" as my_var %}
Included Modules
Defined in:
marten/template/tag/asset.crConstructors
Instance Method Summary
-
#render(context : Context) : String
Render the template tag for a given context.
Instance methods inherited from module Marten::Template::Tag::CanSplitSmartly
split_smartly(expression : String) : Array(String)
split_smartly
Instance methods inherited from module Marten::Template::Tag::CanExtractKwargs
extract_kwargs(source : String)
extract_kwargs
Instance methods inherited from class Marten::Template::Tag::Base
render(context : Context) : String
render
Constructor methods inherited from class Marten::Template::Tag::Base
new(parser : Parser, source : String)
new
Constructor Detail
Instance Method Detail
Description copied from class Marten::Template::Tag::Base
Render the template tag for a given context.