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
-
#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.
42 43 44 45 46 |
# File 'lib/pathway.rb', line 42 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.
37 38 39 |
# File 'lib/pathway.rb', line 37 def details @details end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
37 38 39 |
# File 'lib/pathway.rb', line 37 def @message end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
37 38 39 |
# File 'lib/pathway.rb', line 37 def type @type end |