class Minipack::ManifestRepository
Attributes
default[RW]
Public Class Methods
new()
click to toggle source
# File lib/minipack/manifest_repository.rb, line 9 def initialize @manifests = {} @default = nil # a pointer to a default manifest end
Public Instance Methods
add(key, path, **options)
click to toggle source
@private
# File lib/minipack/manifest_repository.rb, line 19 def add(key, path, **options) manifest = Minipack::Manifest.new(path, **options) # Mark a first one as a default @default = manifest if @manifests.empty? @manifests[key.to_sym] = manifest end
all_manifests()
click to toggle source
# File lib/minipack/manifest_repository.rb, line 14 def all_manifests @manifests.values end
get(key)
click to toggle source
# File lib/minipack/manifest_repository.rb, line 26 def get(key) @manifests[key.to_sym] || raise(NotFoundError, "manifest associated with #{key} not found") end