Class: JsonSchema::ValidationError

Inherits:
SchemaError show all
Defined in:
lib/json_schema/schema_error.rb

Instance Attribute Summary collapse

Attributes inherited from SchemaError

#message, #schema

Instance Method Summary collapse

Methods inherited from SchemaError

aggregate

Constructor Details

#initialize(schema, path, message) ⇒ ValidationError

Returns a new instance of ValidationError.



29
30
31
32
# File 'lib/json_schema/schema_error.rb', line 29

def initialize(schema, path, message)
  super(schema, message)
  @path = path
end

Instance Attribute Details

#pathObject

Returns the value of attribute path.



27
28
29
# File 'lib/json_schema/schema_error.rb', line 27

def path
  @path
end

Instance Method Details

#pointerObject



34
35
36
# File 'lib/json_schema/schema_error.rb', line 34

def pointer
  path.join("/")
end