Exception: Berkshelf::LicenseNotAllowed
- Inherits:
-
BerkshelfError
- Object
- StandardError
- BerkshelfError
- Berkshelf::LicenseNotAllowed
- Defined in:
- lib/berkshelf/errors.rb
Overview
Raised when a CachedCookbook has a license file that isn’t allowed by the Berksfile.
Instance Method Summary collapse
-
#initialize(cookbook) ⇒ LicenseNotAllowed
constructor
A new instance of LicenseNotAllowed.
- #to_s ⇒ Object
Methods inherited from BerkshelfError
Constructor Details
#initialize(cookbook) ⇒ LicenseNotAllowed
Returns a new instance of LicenseNotAllowed.
351 352 353 |
# File 'lib/berkshelf/errors.rb', line 351 def initialize(cookbook) @cookbook = cookbook end |
Instance Method Details
#to_s ⇒ Object
355 356 357 358 359 |
# File 'lib/berkshelf/errors.rb', line 355 def to_s msg = "'#{@cookbook.cookbook_name}' has a license of '#{@cookbook..license}', but" msg << " '#{@cookbook..license}' is not in your list of allowed licenses" msg end |