Class: SimpleJsonapi::Errors::WrappedError
- Inherits:
-
Object
- Object
- SimpleJsonapi::Errors::WrappedError
- Defined in:
- lib/simple_jsonapi/errors/wrapped_error.rb
Overview
A generic serializable error class.
Direct Known Subclasses
Instance Attribute Summary collapse
- #about_link ⇒ String
-
#cause ⇒ Object
The original error.
- #code ⇒ String
- #detail ⇒ String
- #id ⇒ String
- #source_parameter ⇒ String
- #source_pointer ⇒ String
- #status ⇒ String
- #title ⇒ String
Instance Method Summary collapse
-
#initialize(cause = nil, **attributes) ⇒ WrappedError
constructor
A new instance of WrappedError.
Constructor Details
#initialize(cause = nil, **attributes) ⇒ WrappedError
Returns a new instance of WrappedError.
27 28 29 30 31 32 33 |
# File 'lib/simple_jsonapi/errors/wrapped_error.rb', line 27 def initialize(cause = nil, **attributes) self.cause = cause attributes.each do |name, value| send("#{name}=", value) if respond_to?("#{name}=") end end |
Instance Attribute Details
#about_link ⇒ String
23 |
# File 'lib/simple_jsonapi/errors/wrapped_error.rb', line 23 attr_accessor :cause, :id, :status, :code, :title, :detail, :source_pointer, :source_parameter, :about_link |
#cause ⇒ Object
The original error.
23 24 25 |
# File 'lib/simple_jsonapi/errors/wrapped_error.rb', line 23 def cause @cause end |
#code ⇒ String
23 |
# File 'lib/simple_jsonapi/errors/wrapped_error.rb', line 23 attr_accessor :cause, :id, :status, :code, :title, :detail, :source_pointer, :source_parameter, :about_link |
#detail ⇒ String
23 |
# File 'lib/simple_jsonapi/errors/wrapped_error.rb', line 23 attr_accessor :cause, :id, :status, :code, :title, :detail, :source_pointer, :source_parameter, :about_link |
#id ⇒ String
23 |
# File 'lib/simple_jsonapi/errors/wrapped_error.rb', line 23 attr_accessor :cause, :id, :status, :code, :title, :detail, :source_pointer, :source_parameter, :about_link |
#source_parameter ⇒ String
23 |
# File 'lib/simple_jsonapi/errors/wrapped_error.rb', line 23 attr_accessor :cause, :id, :status, :code, :title, :detail, :source_pointer, :source_parameter, :about_link |
#source_pointer ⇒ String
23 |
# File 'lib/simple_jsonapi/errors/wrapped_error.rb', line 23 attr_accessor :cause, :id, :status, :code, :title, :detail, :source_pointer, :source_parameter, :about_link |
#status ⇒ String
23 |
# File 'lib/simple_jsonapi/errors/wrapped_error.rb', line 23 attr_accessor :cause, :id, :status, :code, :title, :detail, :source_pointer, :source_parameter, :about_link |
#title ⇒ String
23 |
# File 'lib/simple_jsonapi/errors/wrapped_error.rb', line 23 attr_accessor :cause, :id, :status, :code, :title, :detail, :source_pointer, :source_parameter, :about_link |