Exception: Petra::ExtendedError
- Inherits:
-
PetraError
- Object
- StandardError
- PetraError
- Petra::ExtendedError
- Defined in:
- lib/petra/exceptions.rb
Overview
Error class which accepts an options hash and sets its key/value pairs as instance variables. Inherited classes therefore only have to specify the corresponding attribute readers
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(**options) ⇒ ExtendedError
constructor
A new instance of ExtendedError.
Constructor Details
#initialize(**options) ⇒ ExtendedError
Returns a new instance of ExtendedError.
19 20 21 22 23 |
# File 'lib/petra/exceptions.rb', line 19 def initialize(**) .each do |k, v| instance_variable_set("@#{k}", v) end end |