Exception: Berkshelf::BerksfileNotFound

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

Instance Method Summary collapse

Methods inherited from BerkshelfError

set_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


24
25
26
# File 'lib/berkshelf/errors.rb', line 24

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

Instance Method Details

#to_sObject


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

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