class Rpush::Daemon::Gcm::Failures
Attributes
all_failed[W]
description[W]
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/rpush/daemon/gcm/delivery.rb, line 205 def initialize super[:all] = [] end
Public Instance Methods
<<(item)
click to toggle source
# File lib/rpush/daemon/gcm/delivery.rb, line 213 def <<(item) self[:all] << item end
any?()
click to toggle source
# File lib/rpush/daemon/gcm/delivery.rb, line 221 def any? self[:all].any? end
description()
click to toggle source
# File lib/rpush/daemon/gcm/delivery.rb, line 217 def description @description ||= describe end
each() { |x| ... }
click to toggle source
# File lib/rpush/daemon/gcm/delivery.rb, line 209 def each self[:all].each { |x| yield x } end
Private Instance Methods
describe()
click to toggle source
# File lib/rpush/daemon/gcm/delivery.rb, line 227 def describe if @all_failed error_description = "Failed to deliver to all recipients." else index_list = map { |item| item[:index] } error_description = "Failed to deliver to recipients #{index_list.join(', ')}." end error_list = map { |item| item[:error] } error_description + " Errors: #{error_list.join(', ')}." end