Exception: Berkshelf::CookbookNotFound

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

Direct Known Subclasses

MissingLockfileCookbookVersion

Instance Method Summary collapse

Methods inherited from BerkshelfError

set_status_code

Constructor Details

#initialize(name, version, location) ⇒ CookbookNotFound

Returns a new instance of CookbookNotFound.


36
37
38
39
40
# File 'lib/berkshelf/errors.rb', line 36

def initialize(name, version, location)
  @name     = name
  @version  = version
  @location = location
end

Instance Method Details

#to_sObject


42
43
44
45
46
47
48
# File 'lib/berkshelf/errors.rb', line 42

def to_s
  if @version
    "Cookbook '#{@name}' (#{@version}) not found #{@location}!"
  else
    "Cookbook '#{@name}' not found #{@location}!"
  end
end