Class: Frenetic::ConfigError
Overview
Raised when there is a configuration error
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(model) ⇒ ConfigError
constructor
A new instance of ConfigError.
- #message ⇒ Object
Constructor Details
#initialize(model) ⇒ ConfigError
Returns a new instance of ConfigError.
10 11 12 13 |
# File 'lib/frenetic/errors.rb', line 10 def initialize(model) @model = model super() end |
Instance Method Details
#message ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/frenetic/errors.rb', line 15 def if @model.is_a? String @model else errs = @model.errors.collect do |key, msg| "#{key.to_s.titleize} #{msg}" end "Invalid Configuration: #{errs.to_sentence}" end end |