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.


335
336
337
# File 'lib/berkshelf/errors.rb', line 335

def initialize(license)
  @license = license
end

Instance Attribute Details

#licenseObject (readonly)

Returns the value of attribute license


333
334
335
# File 'lib/berkshelf/errors.rb', line 333

def license
  @license
end

Instance Method Details

#to_sObject


339
340
341
342
# File 'lib/berkshelf/errors.rb', line 339

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