Class: Skyrocket::AssetDependency
- Inherits:
-
Object
- Object
- Skyrocket::AssetDependency
- Defined in:
- lib/skyrocket/asset_dependency.rb
Instance Attribute Summary collapse
-
#asset ⇒ Object
readonly
Returns the value of attribute asset.
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize(asset, asset_factory) ⇒ AssetDependency
constructor
A new instance of AssetDependency.
- #name ⇒ Object
Constructor Details
#initialize(asset, asset_factory) ⇒ AssetDependency
Returns a new instance of AssetDependency.
5 6 7 8 |
# File 'lib/skyrocket/asset_dependency.rb', line 5 def initialize(asset, asset_factory) @asset = asset @af = asset_factory end |
Instance Attribute Details
#asset ⇒ Object (readonly)
Returns the value of attribute asset.
3 4 5 |
# File 'lib/skyrocket/asset_dependency.rb', line 3 def asset @asset end |
Instance Method Details
#children ⇒ Object
14 15 16 17 |
# File 'lib/skyrocket/asset_dependency.rb', line 14 def children required = DirectiveReader.read_required(@asset) required.map { |r| dep_from_name(r) } end |
#name ⇒ Object
10 11 12 |
# File 'lib/skyrocket/asset_dependency.rb', line 10 def name @asset.to_s end |