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.



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

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



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

def location
  @location
end

#typeSymbol (readonly)

Returns either :uri or :file.

Returns:

  • (Symbol)

    either :uri or :file



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

def type
  @type
end