Exception: JSON::Schema::ReadRefused

Inherits:
StandardError
  • Object
show all
Defined in:
lib/json-schema/schema/reader.rb

Overview

Raised by Reader when one of its settings indicate a schema should not be readed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(location, type) ⇒ ReadRefused

Returns a new instance of ReadRefused.



16
17
18
19
20
# File 'lib/json-schema/schema/reader.rb', line 16

def initialize(location, type)
  @location = location
  @type = type
  super("Read of #{type == :uri ? 'URI' : type} at #{location} refused!")
end

Instance Attribute Details

#locationString (readonly)

Returns the requested schema location which was refused.

Returns:

  • (String)

    the requested schema location which was refused



11
12
13
# File 'lib/json-schema/schema/reader.rb', line 11

def location
  @location
end

#typeSymbol (readonly)

Returns either :uri or :file.

Returns:

  • (Symbol)

    either :uri or :file



14
15
16
# File 'lib/json-schema/schema/reader.rb', line 14

def type
  @type
end