Exception: Berkshelf::InvalidConfiguration

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

Instance Method Summary collapse

Methods inherited from BerkshelfError

status_code

Constructor Details

#initialize(errors) ⇒ InvalidConfiguration

Returns a new instance of InvalidConfiguration.



132
133
134
# File 'lib/berkshelf/errors.rb', line 132

def initialize(errors)
  @errors = errors
end

Instance Method Details

#to_sObject



136
137
138
139
140
141
142
143
144
145
146
# File 'lib/berkshelf/errors.rb', line 136

def to_s
  strings = ["Invalid configuration:"]

  @errors.each do |key, errors|
    errors.each do |error|
      strings << "  #{key} #{error}"
    end
  end

  strings.join "\n"
end