Sha256: 8ce9affac86e79a62ed127730c42c8aec4217b176e1e72536f1e9708681a780e
Contents?: true
Size: 615 Bytes
Versions: 16
Compression:
Stored size: 615 Bytes
Contents
module Kuby module Docker class PackageList include Enumerable attr_reader :packages def initialize(package_tuples) @packages = [] package_tuples.each { |pt| add(*pt) } end def [](name) packages.find { |pkg| pkg.name == name } end def add(name, version = nil) packages << Package.new(name, version) end def delete(name) packages.delete_if { |pkg| pkg.name == name } end def each(&block) packages.each(&block) end def empty? packages.empty? end end end end
Version data entries
16 entries across 16 versions & 1 rubygems