Module: TryTo

Defined in:
lib/try_to.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.default_handlerObject

Returns the value of attribute default_handler.



3
4
5
# File 'lib/try_to.rb', line 3

def default_handler
  @default_handler
end

.exceptionsObject (readonly)

Returns the value of attribute exceptions.



4
5
6
# File 'lib/try_to.rb', line 4

def exceptions
  @exceptions
end

.handlersObject (readonly)

Returns the value of attribute handlers.



4
5
6
# File 'lib/try_to.rb', line 4

def handlers
  @handlers
end

Class Method Details

.add_handler(exception, handler) ⇒ Object



7
8
9
# File 'lib/try_to.rb', line 7

def self.add_handler(exception, handler)
  @handlers.merge!(exception => handler)
end