class Keratin::ClientError

Attributes

errors[R]

Public Class Methods

new(errors) click to toggle source
Calls superclass method
# File lib/keratin/client.rb, line 17
def initialize(errors)
  @errors = errors.map{|e| [e['field'], e['message']] }
    .group_by(&:first)
    .map{|k, v| [k, v.map(&:last)] }
    .to_h

  super(@errors.inspect)
end