Class: Qs::ErrorContext
- Inherits:
-
Object
- Object
- Qs::ErrorContext
- Defined in:
- lib/qs/error_handler.rb
Instance Attribute Summary collapse
-
#daemon_data ⇒ Object
readonly
Returns the value of attribute daemon_data.
-
#encoded_payload ⇒ Object
readonly
Returns the value of attribute encoded_payload.
-
#handler_class ⇒ Object
readonly
Returns the value of attribute handler_class.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#queue_name ⇒ Object
readonly
Returns the value of attribute queue_name.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(args) ⇒ ErrorContext
constructor
A new instance of ErrorContext.
Constructor Details
#initialize(args) ⇒ ErrorContext
Returns a new instance of ErrorContext.
43 44 45 46 47 48 49 |
# File 'lib/qs/error_handler.rb', line 43 def initialize(args) @daemon_data = args.fetch(:daemon_data) @queue_name = get_queue_name(args.fetch(:queue_redis_key)) @encoded_payload = args.fetch(:encoded_payload) @message = args.fetch(:message) @handler_class = args.fetch(:handler_class) end |
Instance Attribute Details
#daemon_data ⇒ Object (readonly)
Returns the value of attribute daemon_data.
39 40 41 |
# File 'lib/qs/error_handler.rb', line 39 def daemon_data @daemon_data end |
#encoded_payload ⇒ Object (readonly)
Returns the value of attribute encoded_payload.
40 41 42 |
# File 'lib/qs/error_handler.rb', line 40 def encoded_payload @encoded_payload end |
#handler_class ⇒ Object (readonly)
Returns the value of attribute handler_class.
41 42 43 |
# File 'lib/qs/error_handler.rb', line 41 def handler_class @handler_class end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
41 42 43 |
# File 'lib/qs/error_handler.rb', line 41 def @message end |
#queue_name ⇒ Object (readonly)
Returns the value of attribute queue_name.
40 41 42 |
# File 'lib/qs/error_handler.rb', line 40 def queue_name @queue_name end |
Instance Method Details
#==(other) ⇒ Object
51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/qs/error_handler.rb', line 51 def ==(other) if other.kind_of?(self.class) self.daemon_data == other.daemon_data && self.queue_name == other.queue_name && self.encoded_payload == other.encoded_payload && self. == other. && self.handler_class == other.handler_class else super end end |