class Rpush::DeliveryError

Attributes

code[R]
notification_id[R]

Public Class Methods

new(code, notification_id, description) click to toggle source
# File lib/rpush/daemon/delivery_error.rb, line 5
def initialize(code, notification_id, description)
  @code = code
  @notification_id = notification_id
  @description = description
end

Public Instance Methods

==(other) click to toggle source
# File lib/rpush/daemon/delivery_error.rb, line 20
def ==(other)
  other.is_a?(DeliveryError) && \
    other.code == code && \
    other.notification_id == notification_id && \
    other.to_s == to_s
end
message() click to toggle source
# File lib/rpush/daemon/delivery_error.rb, line 15
def message
  error_str = [@code, "(#{@description})"].compact.join(' ')
  "Unable to deliver notification #{@notification_id}, received error #{error_str}"
end
to_s() click to toggle source
# File lib/rpush/daemon/delivery_error.rb, line 11
def to_s
  message
end