Exception: Stic::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Stic::Error
- Defined in:
- lib/stic/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#cause ⇒ Object
readonly
Returns the value of attribute cause.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(opts = {}) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 |
# File 'lib/stic/errors.rb', line 5 def initialize(opts = {}) @cause = opts.fetch :cause, $! super opts.fetch(:message) { self. } end |
Instance Attribute Details
#cause ⇒ Object (readonly)
Returns the value of attribute cause.
3 4 5 |
# File 'lib/stic/errors.rb', line 3 def cause @cause end |