Exception: Pathway::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Pathway::Error
- Defined in:
- lib/pathway.rb
Instance Attribute Summary collapse
-
#details ⇒ Object
(also: #errors)
readonly
Returns the value of attribute details.
-
#message ⇒ Object
(also: #error_message)
readonly
Returns the value of attribute message.
-
#type ⇒ Object
(also: #error_type)
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#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.
40 41 42 43 44 |
# File 'lib/pathway.rb', line 40 def initialize(type:, message: nil, details: nil) @type = type.to_sym @message = || (type) @details = details || {} end |
Instance Attribute Details
#details ⇒ Object (readonly) Also known as: errors
Returns the value of attribute details.
31 32 33 |
# File 'lib/pathway.rb', line 31 def details @details end |
#message ⇒ Object (readonly) Also known as: error_message
Returns the value of attribute message.
31 32 33 |
# File 'lib/pathway.rb', line 31 def @message end |
#type ⇒ Object (readonly) Also known as: error_type
Returns the value of attribute type.
31 32 33 |
# File 'lib/pathway.rb', line 31 def type @type end |