Exception: Berkshelf::LicenseNotFound

Inherits:
BerkshelfError show all
Defined in:
lib/berkshelf/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BerkshelfError

set_status_code

Constructor Details

#initialize(license) ⇒ LicenseNotFound

Returns a new instance of LicenseNotFound.



369
370
371
# File 'lib/berkshelf/errors.rb', line 369

def initialize(license)
  @license = license
end

Instance Attribute Details

#licenseObject (readonly)

Returns the value of attribute license.



367
368
369
# File 'lib/berkshelf/errors.rb', line 367

def license
  @license
end

Instance Method Details

#to_sObject Also known as: message



373
374
375
376
# File 'lib/berkshelf/errors.rb', line 373

def to_s
  "Unknown license: '#{license}'\n" +
    "Available licenses: #{CookbookGenerator::LICENSES.join(", ")}"
end