Class: Pathway::Error
- Inherits:
-
Object
- Object
- Pathway::Error
- Defined in:
- lib/pathway.rb
Instance Attribute Summary collapse
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #deconstruct ⇒ Object
- #deconstruct_keys(_) ⇒ Object
-
#initialize(type:, message: nil, details: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(type:, message: nil, details: nil) ⇒ Error
Returns a new instance of Error.
41 42 43 44 45 |
# File 'lib/pathway.rb', line 41 def initialize(type:, message: nil, details: nil) @type = type.to_sym @message = || (type) @details = details || {} end |
Instance Attribute Details
#details ⇒ Object (readonly)
Returns the value of attribute details.
36 37 38 |
# File 'lib/pathway.rb', line 36 def details @details end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
36 37 38 |
# File 'lib/pathway.rb', line 36 def @message end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
36 37 38 |
# File 'lib/pathway.rb', line 36 def type @type end |
Instance Method Details
#deconstruct ⇒ Object
47 |
# File 'lib/pathway.rb', line 47 def deconstruct = [type, , details] |
#deconstruct_keys(_) ⇒ Object
48 |
# File 'lib/pathway.rb', line 48 def deconstruct_keys(_) = { type:, message:, details: } |