Exception: Petra::ExtendedError

Inherits:
PetraError
  • Object
show all
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

HandlerException

Instance Method Summary collapse

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(**options)
  options.each do |k, v|
    instance_variable_set("@#{k}", v)
  end
end