The sub-classes of PackageManager::Base must define mapping() and versions() class methods, which return Hashes of data we need to update the project/versions in PackageManager::Base.update().
these two changes should help standardize those two methods:
adds a PackageManager::Base::MappingBuilder.build_hash() method that defines a required set of key and optional set of keys, and returns a Hash with the given keywords.
adds a PackageManager::Base::VersionBuilder.build_hash() method that defines a required set of keys and optional set of keys, and returns a Hash with the given keywords.
with these two classes, passing unknown or accidental keys back will raise an error, and we'll have a documented way of returning this data so it's obvious and clear.
The sub-classes of
PackageManager::Base
must definemapping()
andversions()
class methods, which return Hashes of data we need to update the project/versions inPackageManager::Base.update()
.these two changes should help standardize those two methods:
PackageManager::Base::MappingBuilder.build_hash()
method that defines a required set of key and optional set of keys, and returns a Hash with the given keywords.PackageManager::Base::VersionBuilder.build_hash()
method that defines a required set of keys and optional set of keys, and returns a Hash with the given keywords.with these two classes, passing unknown or accidental keys back will raise an error, and we'll have a documented way of returning this data so it's obvious and clear.