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.



125
126
127
# File 'lib/berkshelf/errors.rb', line 125

def initialize(errors)
  @errors = errors
end

Instance Method Details

#to_sObject



129
130
131
132
133
134
135
136
137
138
139
# File 'lib/berkshelf/errors.rb', line 129

def to_s
  strings = ["Invalid configuration:"]

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

  strings.join "\n"
end