Exception: Clearbooks::InvalidConfiguration

Inherits:
ClearbooksError show all
Defined in:
lib/clearbooks/error/errors.rb

Instance Method Summary collapse

Methods inherited from ClearbooksError

status_code

Constructor Details

#initialize(errors) ⇒ InvalidConfiguration

Returns a new instance of InvalidConfiguration.



121
122
123
# File 'lib/clearbooks/error/errors.rb', line 121

def initialize(errors)
  @errors = errors
end

Instance Method Details

#to_sObject



125
126
127
128
129
130
131
132
133
134
# File 'lib/clearbooks/error/errors.rb', line 125

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