Exception: JSON::Schema::ReadRefused
- Inherits:
-
StandardError
- Object
- StandardError
- JSON::Schema::ReadRefused
- 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
-
#location ⇒ String
readonly
The requested schema location which was refused.
-
#type ⇒ Symbol
readonly
Either
:uri
or:file
.
Instance Method Summary collapse
-
#initialize(location, type) ⇒ ReadRefused
constructor
A new instance of ReadRefused.
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
#location ⇒ String (readonly)
Returns the requested schema location which was refused.
11 12 13 |
# File 'lib/json-schema/schema/reader.rb', line 11 def location @location end |
#type ⇒ Symbol (readonly)
Returns either :uri
or :file
.
14 15 16 |
# File 'lib/json-schema/schema/reader.rb', line 14 def type @type end |