Class: BunBunBundle::Manifest::Entry
- Inherits:
-
Data
- Object
- Data
- BunBunBundle::Manifest::Entry
- Defined in:
- lib/bun_bun_bundle/manifest.rb
Instance Attribute Summary collapse
-
#sri ⇒ Object
readonly
Returns the value of attribute sri.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Attribute Details
#sri ⇒ Object (readonly)
Returns the value of attribute sri
11 12 13 |
# File 'lib/bun_bun_bundle/manifest.rb', line 11 def sri @sri end |
#url ⇒ Object (readonly)
Returns the value of attribute url
11 12 13 |
# File 'lib/bun_bun_bundle/manifest.rb', line 11 def url @url end |
Class Method Details
.from(value) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/bun_bun_bundle/manifest.rb', line 12 def self.from(value) value.is_a?(Hash) || raise( MigrationError, 'Manifest predates bun_bun_bundle 0.13. Run: bun_bun_bundle build', ) if (url = value['url']).nil? || url.empty? raise InvalidEntryError, "Manifest entry is missing 'url'" end new(url: url, sri: Array(value['sri']).freeze) end |