Exception: MotherBrain::InvalidConfig
- Defined in:
- lib/mb/errors.rb
Constant Summary
Constants inherited from MBError
Instance Attribute Summary collapse
- #errors ⇒ ActiveModel::Errors readonly
Instance Method Summary collapse
-
#initialize(errors) ⇒ InvalidConfig
constructor
A new instance of InvalidConfig.
- #message ⇒ Object
Methods inherited from MBError
#error_code, error_code, exit_code, #exit_code, #to_hash, #to_json, #to_s
Constructor Details
#initialize(errors) ⇒ InvalidConfig
Returns a new instance of InvalidConfig.
332 333 334 |
# File 'lib/mb/errors.rb', line 332 def initialize(errors) @errors = errors end |
Instance Attribute Details
#errors ⇒ ActiveModel::Errors (readonly)
329 330 331 |
# File 'lib/mb/errors.rb', line 329 def errors @errors end |
Instance Method Details
#message ⇒ Object
336 337 338 339 340 341 342 343 |
# File 'lib/mb/errors.rb', line 336 def msg = errors.collect do |key, | "* #{key}: #{.join(', ')}" end msg.unshift "-----" msg.unshift "Invalid Configuration File" msg.join("\n") end |