Class: JSI::Validation::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/jsi/validation/error.rb

Overview

a validation error of a schema instance against a schema

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Error

Returns a new instance of Error.



32
33
34
35
# File 'lib/jsi/validation/error.rb', line 32

def initialize(attributes = {})
  super
  freeze
end

Instance Attribute Details

#instance_documentObject

document containing the instance at instance_ptr

Returns:

  • (Object)


31
32
33
34
35
36
# File 'lib/jsi/validation/error.rb', line 31

class Error
  def initialize(attributes = {})
    super
    freeze
  end
end

#instance_ptrJSI::Ptr

pointer to the instance in instance_document

Returns:



31
32
33
34
35
36
# File 'lib/jsi/validation/error.rb', line 31

class Error
  def initialize(attributes = {})
    super
    freeze
  end
end

#keywordString

the keyword of the schema which failed to validate. this may be absent if the error is not from a schema keyword (i.e, false schema).

Returns:

  • (String)


31
32
33
34
35
36
# File 'lib/jsi/validation/error.rb', line 31

class Error
  def initialize(attributes = {})
    super
    freeze
  end
end

#messageString

a message describing the error

Returns:

  • (String)


31
32
33
34
35
36
# File 'lib/jsi/validation/error.rb', line 31

class Error
  def initialize(attributes = {})
    super
    freeze
  end
end

#schemaJSI::Schema

the schema against which the instance failed to validate

Returns:



31
32
33
34
35
36
# File 'lib/jsi/validation/error.rb', line 31

class Error
  def initialize(attributes = {})
    super
    freeze
  end
end