Exception: Berkshelf::CookbookNotFound
- Inherits:
-
BerkshelfError
- Object
- StandardError
- BerkshelfError
- Berkshelf::CookbookNotFound
- Defined in:
- lib/berkshelf/errors.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(name, version, location) ⇒ CookbookNotFound
constructor
A new instance of CookbookNotFound.
- #to_s ⇒ Object (also: #message)
Methods inherited from BerkshelfError
Constructor Details
#initialize(name, version, location) ⇒ CookbookNotFound
Returns a new instance of CookbookNotFound.
39 40 41 42 43 |
# File 'lib/berkshelf/errors.rb', line 39 def initialize(name, version, location) @name = name @version = version @location = location end |
Instance Method Details
#to_s ⇒ Object Also known as: message
45 46 47 48 49 50 51 |
# File 'lib/berkshelf/errors.rb', line 45 def to_s if @version "Cookbook '#{@name}' (#{@version}) not found #{@location}!" else "Cookbook '#{@name}' not found #{@location}!" end end |