Exception: Berkshelf::DuplicateDependencyDefined

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(name) ⇒ DuplicateDependencyDefined

Returns a new instance of DuplicateDependencyDefined.



59
60
61
# File 'lib/berkshelf/errors.rb', line 59

def initialize(name)
  @name = name
end

Instance Method Details

#to_sObject Also known as: message



63
64
65
66
67
68
# File 'lib/berkshelf/errors.rb', line 63

def to_s
  out = "Your Berksfile contains multiple entries named "
  out << "'#{@name}'. Please remove duplicate dependencies, or put them in "
  out << "different groups."
  out
end