Sha256: 97988ea4fa91cc6d0906297b6c3bcb271747da55b640db5ae33ebe96c97af8cf
Contents?: true
Size: 514 Bytes
Versions: 20
Compression:
Stored size: 514 Bytes
Contents
module RDStation class ErrorHandler class ConflictingField attr_reader :errors ERROR_CODE = 'CONFLICTING_FIELD'.freeze def initialize(errors) @errors = errors end def raise_error return if conflicting_field_errors.empty? raise RDStation::Error::ConflictingField, conflicting_field_errors.first end private def conflicting_field_errors errors.select { |error| error['error_type'] == ERROR_CODE } end end end end
Version data entries
20 entries across 20 versions & 1 rubygems