class Berkshelf::DependencyNotFound
Public Class Methods
new(names)
click to toggle source
@param [String, Array<String>] names
the list of cookbook names that were not defined
# File lib/berkshelf/errors.rb, line 197 def initialize(names) @names = Array(names) end
Public Instance Methods
to_s()
click to toggle source
# File lib/berkshelf/errors.rb, line 201 def to_s if @names.size == 1 "Dependency '#{@names.first}' was not found. Please make sure it is " \ "in your Berksfile, and then run `berks install` to download and " \ "install the missing dependencies." else out = "The following dependencies were not found:\n" @names.each do |name| out << " * #{name}\n" end out << "\n" out << "Please make sure they are in your Berksfile, and then run " out << "`berks install` to download and install the missing " out << "dependencies." out end end
Also aliased as: message