Class: Mutations::ValidationException

Inherits:
Object
  • Object
show all
Defined in:
lib/mutations_validate_outcome.rb

Direct Known Subclasses

YoValidationException

Instance Method Summary collapse

Instance Method Details

#inspectObject



54
55
56
57
58
59
# File 'lib/mutations_validate_outcome.rb', line 54

def inspect
  # rubocop:disable Style/FormatString
  oid = '%x' % (object_id << 1)
  "#<Mutations::ValidationException:0x#{oid.rjust(14, '0')} @errors=<#{errors}>>"
  # rubocop:enable Style/FormatString
end

#messageObject



61
62
63
64
65
# File 'lib/mutations_validate_outcome.rb', line 61

def message
  errors.map do |k, v|
    "#{k}: “#{v.message || v.symbol}"
  end.join(', ')
end