Exception: Berkshelf::InvalidConfiguration
- Inherits:
-
BerkshelfError
- Object
- StandardError
- BerkshelfError
- Berkshelf::InvalidConfiguration
- Defined in:
- lib/berkshelf/errors.rb
Instance Method Summary collapse
-
#initialize(errors) ⇒ InvalidConfiguration
constructor
A new instance of InvalidConfiguration.
- #to_s ⇒ Object (also: #message)
Methods inherited from BerkshelfError
Constructor Details
#initialize(errors) ⇒ InvalidConfiguration
Returns a new instance of InvalidConfiguration.
158 159 160 |
# File 'lib/berkshelf/errors.rb', line 158 def initialize(errors) @errors = errors end |
Instance Method Details
#to_s ⇒ Object Also known as: message
162 163 164 165 166 167 168 169 170 171 |
# File 'lib/berkshelf/errors.rb', line 162 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 |