Class: Webpack::Manifest::Entries
- Inherits:
-
Object
- Object
- Webpack::Manifest::Entries
- Defined in:
- lib/webpack/manifest/entries.rb
Defined Under Namespace
Classes: MissingEntryError
Instance Attribute Summary collapse
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
Instance Method Summary collapse
-
#initialize(entries) ⇒ Entries
constructor
A new instance of Entries.
- #lookup(entry) ⇒ Object
- #lookup!(entry) ⇒ Object
Constructor Details
#initialize(entries) ⇒ Entries
Returns a new instance of Entries.
12 13 14 |
# File 'lib/webpack/manifest/entries.rb', line 12 def initialize(entries) @entries = entries end |
Instance Attribute Details
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
10 11 12 |
# File 'lib/webpack/manifest/entries.rb', line 10 def entries @entries end |
Instance Method Details
#lookup(entry) ⇒ Object
16 17 18 |
# File 'lib/webpack/manifest/entries.rb', line 16 def lookup(entry) entries.fetch(entry) { nil } end |
#lookup!(entry) ⇒ Object
20 21 22 |
# File 'lib/webpack/manifest/entries.rb', line 20 def lookup!(entry) lookup(entry) || raise(MissingEntryError, "missing entry: #{entry}") end |