Exception: Berkshelf::CookbookValidationFailure

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

Instance Method Summary collapse

Methods inherited from BerkshelfError

set_status_code

Constructor Details

#initialize(dependency, cached_cookbook) ⇒ CookbookValidationFailure

Returns a new instance of CookbookValidationFailure.

Parameters:

  • location (Location)

    the location (or any subclass) raising this validation error

  • cached_cookbook (CachedCookbook)

    the cached_cookbook that does not satisfy the constraint



244
245
246
247
# File 'lib/berkshelf/errors.rb', line 244

def initialize(dependency, cached_cookbook)
  @dependency      = dependency
  @cached_cookbook = cached_cookbook
end

Instance Method Details

#to_sObject Also known as: message



249
250
251
# File 'lib/berkshelf/errors.rb', line 249

def to_s
  "The cookbook downloaded for #{@dependency} did not satisfy the constraint."
end