Class: CabezaDeTermo::Assets::ReferenceBase
- Inherits:
-
Object
- Object
- CabezaDeTermo::Assets::ReferenceBase
- Defined in:
- lib/cabeza-de-termo/assets/bundles/reference-base.rb
Overview
Base class for classes that models a reference to an asset or bundle. These references are held by a Bundle object when defined in the Library:definition block.
Direct Known Subclasses
Class Method Summary collapse
-
.on(reference_id) ⇒ Object
Answer a new instance on the reference_id.
Instance Method Summary collapse
-
#collect_assets_with(assets_collector) ⇒ Object
Add the referenced assets to the assets_collector.
-
#initialize(reference_id) ⇒ ReferenceBase
constructor
Initialize the instance on the reference_id.
-
#reference_id ⇒ Object
Answer the reference_id.
Constructor Details
#initialize(reference_id) ⇒ ReferenceBase
Initialize the instance on the reference_id.
13 14 15 |
# File 'lib/cabeza-de-termo/assets/bundles/reference-base.rb', line 13 def initialize(reference_id) @reference_id = reference_id end |
Class Method Details
.on(reference_id) ⇒ Object
Answer a new instance on the reference_id.
8 9 10 |
# File 'lib/cabeza-de-termo/assets/bundles/reference-base.rb', line 8 def self.on(reference_id) new(reference_id) end |
Instance Method Details
#collect_assets_with(assets_collector) ⇒ Object
Add the referenced assets to the assets_collector
23 24 25 |
# File 'lib/cabeza-de-termo/assets/bundles/reference-base.rb', line 23 def collect_assets_with(assets_collector) CdT.subclass_responsibility end |
#reference_id ⇒ Object
Answer the reference_id
18 19 20 |
# File 'lib/cabeza-de-termo/assets/bundles/reference-base.rb', line 18 def reference_id @reference_id end |