Sha256: 0155623c89a880d1a390573f06ea9a5e2caedffd767ead9d6e01964db82da766
Contents?: true
Size: 473 Bytes
Versions: 13
Compression:
Stored size: 473 Bytes
Contents
class Tram::Policy # An exception to be risen by [Tram::Policy#validate!] class ValidationError < RuntimeError # Policy object whose validation has caused the exception # # @return [Tram::Policy] # attr_reader :policy private def initialize(policy, filter) @policy = policy messages = policy.errors.reject(&filter).map(&:full_message) super (["Validation failed with errors:"] + messages).join("\n- ") end end end
Version data entries
13 entries across 13 versions & 1 rubygems