Class: Kagi::API::Models::Content::Error
- Inherits:
-
Data
- Object
- Data
- Kagi::API::Models::Content::Error
- Defined in:
- lib/kagi/api/models/content/error.rb
Overview
Models error data.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#reference ⇒ Object
readonly
Returns the value of attribute reference.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(reference: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(reference: nil) ⇒ Error
Returns a new instance of Error.
15 16 17 |
# File 'lib/kagi/api/models/content/error.rb', line 15 def initialize(reference: nil, **) super end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code
10 11 12 |
# File 'lib/kagi/api/models/content/error.rb', line 10 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message
10 11 12 |
# File 'lib/kagi/api/models/content/error.rb', line 10 def @message end |
#reference ⇒ Object (readonly)
Returns the value of attribute reference
10 11 12 |
# File 'lib/kagi/api/models/content/error.rb', line 10 def reference @reference end |
Class Method Details
.for(key_map: ERROR_MAP, **attributes) ⇒ Object
11 12 13 |
# File 'lib/kagi/api/models/content/error.rb', line 11 def self.for(key_map: ERROR_MAP, **attributes) new(**attributes.transform_keys(key_map)) end |