abstract class
Components::Assets::Asset
- Components::Assets::Asset
- Reference
- Object
Overview
Base class for all assets in the pipeline
Direct Known Subclasses
- Components::Assets::CSSAsset
- Components::Assets::ImageAsset
- Components::Assets::JSAsset
- Components::Assets::StaticAsset
Defined in:
components/assets/base/asset.crConstructors
Instance Method Summary
-
#add_dependency(asset_id : String) : Nil
Add a dependency
-
#content : String
Asset content
-
#content=(content : String)
Asset content
-
#content_type : String
Abstract method - must be implemented by subclasses
-
#dependencies : Array(String)
Dependencies on other assets
-
#fingerprint : String
Generate a fingerprint for cache busting
-
#get_metadata(key : String) : String | Nil
Get metadata
-
#id : String
Unique identifier for this asset
-
#metadata : Hash(String, String)
Asset metadata
-
#modified? : Bool
Check if asset has been modified
-
#output_filename : String
Get the output filename for this asset
-
#process : String
Process the asset (compile, optimize, etc.)
- #processed_content : String
-
#reload : Nil
Reload content from source
-
#remove_dependency(asset_id : String) : Nil
Remove a dependency
-
#set_metadata(key : String, value : String) : Nil
Set metadata
-
#source_path? : String | Nil
Source file path (if file-based)
-
#to_h : Hash(String, JSON::Any)
Convert to hash for serialization
-
#updated_at : Time
Timestamp for cache invalidation