Class: Consumer::Controls::Consumer::ErrorHandler::Example
- Inherits:
-
Object
- Object
- Consumer::Controls::Consumer::ErrorHandler::Example
- Includes:
- Consumer
- Defined in:
- lib/consumer/controls/consumer/error_handler.rb
Instance Attribute Summary collapse
-
#failed_message ⇒ Object
Returns the value of attribute failed_message.
-
#handled_error ⇒ Object
Returns the value of attribute handled_error.
Instance Method Summary collapse
- #error_raised(error, message) ⇒ Object
- #failed_message?(message) ⇒ Boolean
- #handled_error?(error = nil) ⇒ Boolean
Methods included from Consumer
#dispatch, included, #start, #update_position
Instance Attribute Details
#failed_message ⇒ Object
Returns the value of attribute failed_message.
15 16 17 |
# File 'lib/consumer/controls/consumer/error_handler.rb', line 15 def @failed_message end |
#handled_error ⇒ Object
Returns the value of attribute handled_error.
14 15 16 |
# File 'lib/consumer/controls/consumer/error_handler.rb', line 14 def handled_error @handled_error end |
Instance Method Details
#error_raised(error, message) ⇒ Object
20 21 22 23 |
# File 'lib/consumer/controls/consumer/error_handler.rb', line 20 def error_raised(error, ) self.handled_error = error self. = end |
#failed_message?(message) ⇒ Boolean
33 34 35 |
# File 'lib/consumer/controls/consumer/error_handler.rb', line 33 def () == end |
#handled_error?(error = nil) ⇒ Boolean
25 26 27 28 29 30 31 |
# File 'lib/consumer/controls/consumer/error_handler.rb', line 25 def handled_error?(error=nil) if error.nil? !handled_error.nil? else handled_error == error end end |