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



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

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

Instance Method Details

#to_sObject Also known as: message



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

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