class Chef::CookbookLoader

This class is used by knife, cheffs and legacy chef-solo modes. It is not used by the server mode of chef-client or zolo/zero modes.

This class implements orchestration around producing a single cookbook_version for a cookbook or loading a Mash of all cookbook_versions, using the cookbook_version_loader class, and doing lazy-access and memoization to only load each cookbook once on demand.

This implements a key-value style each which makes it appear to be a Hash of String => CookbookVersion pairs where the String is the cookbook name. The use of Enumerable combined with the Hash-style each is likely not entirely sane.

This object is also passed and injected into the CookbookCollection object where it is converted to a Mash that looks almost exactly like the cookbook_by_name Mash in this object.