Exception: Berkshelf::InvalidConfiguration

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

Instance Method Summary collapse

Methods inherited from BerkshelfError

set_status_code

Constructor Details

#initialize(errors) ⇒ InvalidConfiguration

Returns a new instance of InvalidConfiguration.



144
145
146
# File 'lib/berkshelf/errors.rb', line 144

def initialize(errors)
  @errors = errors
end

Instance Method Details

#to_sObject



148
149
150
151
152
153
154
155
156
157
# File 'lib/berkshelf/errors.rb', line 148

def to_s
  out = "Invalid configuration:\n"
  @errors.each do |key, errors|
    errors.each do |error|
      out << "  #{key} #{error}\n"
    end
  end

  out.strip
end