Module: TryTo
- Defined in:
- lib/try_to.rb
Class Attribute Summary collapse
-
.default_handler ⇒ Object
Returns the value of attribute default_handler.
-
.exceptions ⇒ Object
readonly
Returns the value of attribute exceptions.
-
.handlers ⇒ Object
readonly
Returns the value of attribute handlers.
Class Method Summary collapse
Class Attribute Details
.default_handler ⇒ Object
Returns the value of attribute default_handler.
3 4 5 |
# File 'lib/try_to.rb', line 3 def default_handler @default_handler end |
.exceptions ⇒ Object (readonly)
Returns the value of attribute exceptions.
4 5 6 |
# File 'lib/try_to.rb', line 4 def exceptions @exceptions end |
.handlers ⇒ Object (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 |