Class: DataDomeError
- Inherits:
-
Object
- Object
- DataDomeError
- Defined in:
- lib/model/api/response.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#field ⇒ Object
readonly
Returns the value of attribute field.
Instance Method Summary collapse
-
#initialize(error) ⇒ DataDomeError
constructor
A new instance of DataDomeError.
Constructor Details
#initialize(error) ⇒ DataDomeError
Returns a new instance of DataDomeError.
17 18 19 20 |
# File 'lib/model/api/response.rb', line 17 def initialize(error) @field = error&.fetch("field", nil) @error = error&.fetch("error", nil) end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
15 16 17 |
# File 'lib/model/api/response.rb', line 15 def error @error end |
#field ⇒ Object (readonly)
Returns the value of attribute field.
15 16 17 |
# File 'lib/model/api/response.rb', line 15 def field @field end |