Exception: Berkshelf::MismatchedCookbookName
- Inherits:
-
BerkshelfError
- Object
- StandardError
- BerkshelfError
- Berkshelf::MismatchedCookbookName
- Defined in:
- lib/berkshelf/errors.rb
Instance Method Summary collapse
-
#initialize(location, cached_cookbook) ⇒ MismatchedCookbookName
constructor
A new instance of MismatchedCookbookName.
- #to_s ⇒ Object
Methods inherited from BerkshelfError
Constructor Details
permalink #initialize(location, cached_cookbook) ⇒ MismatchedCookbookName
Returns a new instance of MismatchedCookbookName.
171 172 173 174 |
# File 'lib/berkshelf/errors.rb', line 171 def initialize(location, cached_cookbook) @location = location @cached_cookbook = cached_cookbook end |
Instance Method Details
permalink #to_s ⇒ Object
[View source]
176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/berkshelf/errors.rb', line 176 def to_s [ "In your Berksfile, you have:", "", " cookbook '#{@location.name}'", "", "But that cookbook is actually named '#{@cached_cookbook.cookbook_name}'", "", "This can cause potentially unwanted side-effects in the future", "", "NOTE: If you don't explicitly set the `name` attribute in the metadata, the name of the directory will be used!", ].join("\n") end |