Exception: Berkshelf::BerksfileNotFound

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

Instance Method Summary collapse

Methods inherited from BerkshelfError

status_code

Constructor Details

#initialize(filepath) ⇒ BerksfileNotFound

Returns a new instance of BerksfileNotFound.

Parameters:

  • filepath (#to_s)

    the path where a Berksfile was not found



27
28
29
# File 'lib/berkshelf/errors.rb', line 27

def initialize(filepath)
  @filepath = File.dirname(File.expand_path(filepath)) rescue filepath
end

Instance Method Details

#to_sObject



31
32
33
# File 'lib/berkshelf/errors.rb', line 31

def to_s
  "No Berksfile or Berksfile.lock found at '#{@filepath}'!"
end