Class: Simpacker::Manifest
- Inherits:
-
Object
- Object
- Simpacker::Manifest
- Defined in:
- lib/simpacker/manifest.rb
Defined Under Namespace
Classes: MissingEntryError, MissingFileError
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
-
#initialize(config) ⇒ Manifest
constructor
A new instance of Manifest.
- #lookup(*names) ⇒ Object
- #lookup!(*names) ⇒ Object
Constructor Details
#initialize(config) ⇒ Manifest
Returns a new instance of Manifest.
8 9 10 |
# File 'lib/simpacker/manifest.rb', line 8 def initialize(config) @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
6 7 8 |
# File 'lib/simpacker/manifest.rb', line 6 def config @config end |
Instance Method Details
#lookup(*names) ⇒ Object
12 13 14 |
# File 'lib/simpacker/manifest.rb', line 12 def lookup(*names) data.dig(*names.map(&:to_s)) end |
#lookup!(*names) ⇒ Object
16 17 18 |
# File 'lib/simpacker/manifest.rb', line 16 def lookup!(*names) lookup(*names) || handle_missing_entry(names) end |