Class: Qs::ErrorContext

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ ErrorContext

Returns a new instance of ErrorContext.



37
38
39
40
41
42
43
# File 'lib/qs/error_handler.rb', line 37

def initialize(args)
  @daemon_data     = args[:daemon_data]
  @queue_name      = Queue::RedisKey.parse_name(args[:queue_redis_key].to_s)
  @encoded_payload = args[:encoded_payload]
  @message         = args[:message]
  @handler_class   = args[:handler_class]
end

Instance Attribute Details

#daemon_dataObject (readonly)

Returns the value of attribute daemon_data.



33
34
35
# File 'lib/qs/error_handler.rb', line 33

def daemon_data
  @daemon_data
end

#encoded_payloadObject (readonly)

Returns the value of attribute encoded_payload.



34
35
36
# File 'lib/qs/error_handler.rb', line 34

def encoded_payload
  @encoded_payload
end

#handler_classObject (readonly)

Returns the value of attribute handler_class.



35
36
37
# File 'lib/qs/error_handler.rb', line 35

def handler_class
  @handler_class
end

#messageObject (readonly)

Returns the value of attribute message.



35
36
37
# File 'lib/qs/error_handler.rb', line 35

def message
  @message
end

#queue_nameObject (readonly)

Returns the value of attribute queue_name.



34
35
36
# File 'lib/qs/error_handler.rb', line 34

def queue_name
  @queue_name
end

Instance Method Details

#==(other) ⇒ Object



45
46
47
48
49
50
51
52
53
54
55
# File 'lib/qs/error_handler.rb', line 45

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.message         == other.message &&
    self.handler_class   == other.handler_class
  else
    super
  end
end