Class: Unravel::NoErrorHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/unravel.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, ex) ⇒ NoErrorHandler

Returns a new instance of NoErrorHandler.



27
28
29
30
# File 'lib/unravel.rb', line 27

def initialize(name, ex)
  @name = name
  @exception = ex
end

Instance Attribute Details

#exceptionObject (readonly)

Returns the value of attribute exception.



26
27
28
# File 'lib/unravel.rb', line 26

def exception
  @exception
end

#nameObject (readonly)

Returns the value of attribute name.



25
26
27
# File 'lib/unravel.rb', line 25

def name
  @name
end

Instance Method Details

#messageObject



32
33
34
# File 'lib/unravel.rb', line 32

def message
  "Achievement #{name.inspect} is not declared to handle exceptions of type: #{ex.class}"
end