Sha256: 91f728d134f87ff19e39dcfbfc29b96a96553f081a0d2e41274d11b0e2d9c63c
Contents?: true
Size: 456 Bytes
Versions: 23
Compression:
Stored size: 456 Bytes
Contents
require 'ostruct' module Jimmy class ValidationError < StandardError attr_reader :schema, :data, :errors def initialize(schema, data, errors) @schema = schema @data = data @errors = errors.map do |info| OpenStruct.new( property: info[:fragment][2..-1], message: info[:message].gsub(/ in schema \S+$/, ''), aspect: info[:failed_attribute] ) end end end end
Version data entries
23 entries across 23 versions & 1 rubygems