Class: PanStuff::Serializer::ExceptionSerializer
- Inherits:
-
Object
- Object
- PanStuff::Serializer::ExceptionSerializer
- Includes:
- Base
- Defined in:
- lib/pan_stuff/serializer/exception_serializer.rb
Constant Summary
Constants included from Base
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
-
#root ⇒ Object
readonly
Returns the value of attribute root.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status: nil, error: nil, exception: nil, root: true) ⇒ ExceptionSerializer
constructor
A new instance of ExceptionSerializer.
Methods included from Base
#as_json, #run_key_transform!, #to_h
Constructor Details
#initialize(status: nil, error: nil, exception: nil, root: true) ⇒ ExceptionSerializer
Returns a new instance of ExceptionSerializer.
10 11 12 13 14 15 |
# File 'lib/pan_stuff/serializer/exception_serializer.rb', line 10 def initialize(status: nil, error: nil, exception: nil, root: true) @error = error @status = status @exception = exception @root = root end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
8 9 10 |
# File 'lib/pan_stuff/serializer/exception_serializer.rb', line 8 def error @error end |
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
8 9 10 |
# File 'lib/pan_stuff/serializer/exception_serializer.rb', line 8 def exception @exception end |
#root ⇒ Object (readonly)
Returns the value of attribute root.
8 9 10 |
# File 'lib/pan_stuff/serializer/exception_serializer.rb', line 8 def root @root end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/pan_stuff/serializer/exception_serializer.rb', line 8 def status @status end |