Exception: JSON::Schema::ValidationError

Inherits:
Exception
  • Object
show all
Defined in:
lib/json-schema/validator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, fragments, schema) ⇒ ValidationError

Returns a new instance of ValidationError.



14
15
16
17
18
19
# File 'lib/json-schema/validator.rb', line 14

def initialize(message, fragments, schema)
  @fragments = fragments
  @schema = schema
  message = "#{message} in schema #{schema.uri}"
  super(message)
end

Instance Attribute Details

#fragmentsObject (readonly)

Returns the value of attribute fragments.



12
13
14
# File 'lib/json-schema/validator.rb', line 12

def fragments
  @fragments
end

#schemaObject (readonly)

Returns the value of attribute schema.



12
13
14
# File 'lib/json-schema/validator.rb', line 12

def schema
  @schema
end