Exception: Berkshelf::LicenseNotFound
- Inherits:
-
BerkshelfError
- Object
- StandardError
- BerkshelfError
- Berkshelf::LicenseNotFound
- Defined in:
- lib/berkshelf/errors.rb
Instance Attribute Summary collapse
-
#license ⇒ Object
readonly
Returns the value of attribute license.
Instance Method Summary collapse
-
#initialize(license) ⇒ LicenseNotFound
constructor
A new instance of LicenseNotFound.
- #to_s ⇒ Object (also: #message)
Methods inherited from BerkshelfError
Constructor Details
#initialize(license) ⇒ LicenseNotFound
Returns a new instance of LicenseNotFound.
371 372 373 |
# File 'lib/berkshelf/errors.rb', line 371 def initialize(license) @license = license end |
Instance Attribute Details
#license ⇒ Object (readonly)
Returns the value of attribute license.
369 370 371 |
# File 'lib/berkshelf/errors.rb', line 369 def license @license end |
Instance Method Details
#to_s ⇒ Object Also known as: message
375 376 377 378 |
# File 'lib/berkshelf/errors.rb', line 375 def to_s "Unknown license: '#{license}'\n" + "Available licenses: #{CookbookGenerator::LICENSES.join(", ")}" end |