Exception: Zaikio::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Zaikio::Error
- Defined in:
- lib/zaikio/error.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(message = nil, **opts) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message = nil, **opts) ⇒ Error
Returns a new instance of Error.
3 4 5 6 7 8 9 10 11 |
# File 'lib/zaikio/error.rb', line 3 def initialize( = nil, **opts) super() opts.each do |key, value| ivar = "@#{key}".to_sym instance_variable_set(ivar, value) define_singleton_method(key) { instance_variable_get(ivar) } end end |