Class: Senko::Error
- Inherits:
-
Object
- Object
- Senko::Error
- Defined in:
- lib/senko/errors.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#instance_location ⇒ Object
(also: #path)
readonly
Returns the value of attribute instance_location.
-
#keyword ⇒ Object
readonly
Returns the value of attribute keyword.
-
#keyword_location ⇒ Object
(also: #schema_path)
readonly
Returns the value of attribute keyword_location.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
Instance Method Summary collapse
-
#initialize(message:, instance_location:, keyword_location:, keyword:, schema: nil, data: nil) ⇒ Error
constructor
A new instance of Error.
- #to_h ⇒ Object
Constructor Details
#initialize(message:, instance_location:, keyword_location:, keyword:, schema: nil, data: nil) ⇒ Error
Returns a new instance of Error.
7 8 9 10 11 12 13 14 |
# File 'lib/senko/errors.rb', line 7 def initialize(message:, instance_location:, keyword_location:, keyword:, schema: nil, data: nil) @message = @instance_location = instance_location @keyword_location = keyword_location @keyword = keyword @schema = schema @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
5 6 7 |
# File 'lib/senko/errors.rb', line 5 def data @data end |
#instance_location ⇒ Object (readonly) Also known as: path
Returns the value of attribute instance_location.
5 6 7 |
# File 'lib/senko/errors.rb', line 5 def instance_location @instance_location end |
#keyword ⇒ Object (readonly)
Returns the value of attribute keyword.
5 6 7 |
# File 'lib/senko/errors.rb', line 5 def keyword @keyword end |
#keyword_location ⇒ Object (readonly) Also known as: schema_path
Returns the value of attribute keyword_location.
5 6 7 |
# File 'lib/senko/errors.rb', line 5 def keyword_location @keyword_location end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
5 6 7 |
# File 'lib/senko/errors.rb', line 5 def @message end |
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
5 6 7 |
# File 'lib/senko/errors.rb', line 5 def schema @schema end |
Instance Method Details
#to_h ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/senko/errors.rb', line 19 def to_h { 'keywordLocation' => keyword_location, 'instanceLocation' => instance_location, 'error' => } end |