Class: Propshaft::Manifest::ManifestEntry
- Inherits:
-
Object
- Object
- Propshaft::Manifest::ManifestEntry
- Defined in:
- lib/propshaft/manifest.rb
Overview
Represents a single entry in the asset manifest.
Each entry contains information about an asset including its logical path (the original path), digested path (the path with content hash), and optional integrity hash for security verification.
Instance Attribute Summary collapse
-
#digested_path ⇒ Object
readonly
Returns the value of attribute digested_path.
-
#integrity ⇒ Object
readonly
Returns the value of attribute integrity.
-
#logical_path ⇒ Object
readonly
Returns the value of attribute logical_path.
Instance Method Summary collapse
-
#initialize(logical_path:, digested_path:, integrity:) ⇒ ManifestEntry
constructor
Creates a new manifest entry.
-
#to_h ⇒ Object
Converts the manifest entry to a hash representation.
Constructor Details
#initialize(logical_path:, digested_path:, integrity:) ⇒ ManifestEntry
Creates a new manifest entry.
Parameters
-
logical_path- The logical path of the asset -
digested_path- The digested path of the asset -
integrity- The integrity hash of the asset (optional)
22 23 24 25 26 |
# File 'lib/propshaft/manifest.rb', line 22 def initialize(logical_path:, digested_path:, integrity:) # :nodoc: @logical_path = logical_path @digested_path = digested_path @integrity = integrity end |
Instance Attribute Details
#digested_path ⇒ Object (readonly)
Returns the value of attribute digested_path.
13 14 15 |
# File 'lib/propshaft/manifest.rb', line 13 def digested_path @digested_path end |
#integrity ⇒ Object (readonly)
Returns the value of attribute integrity.
13 14 15 |
# File 'lib/propshaft/manifest.rb', line 13 def integrity @integrity end |
#logical_path ⇒ Object (readonly)
Returns the value of attribute logical_path.
13 14 15 |
# File 'lib/propshaft/manifest.rb', line 13 def logical_path @logical_path end |
Instance Method Details
#to_h ⇒ Object
Converts the manifest entry to a hash representation.
Returns a hash containing the digested_path and integrity keys.
31 32 33 |
# File 'lib/propshaft/manifest.rb', line 31 def to_h { digested_path: digested_path, integrity: integrity} end |