Class: Rpush::Daemon::Gcm::Failures

Inherits:
Hash
  • Object
show all
Includes:
Enumerable
Defined in:
lib/rpush/daemon/gcm/delivery.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFailures

Returns a new instance of Failures.



205
206
207
# File 'lib/rpush/daemon/gcm/delivery.rb', line 205

def initialize
  super[:all] = []
end

Instance Attribute Details

#all_failed=(value) ⇒ Object (writeonly)

Sets the attribute all_failed

Parameters:

  • value

    the value to set the attribute all_failed to.



203
204
205
# File 'lib/rpush/daemon/gcm/delivery.rb', line 203

def all_failed=(value)
  @all_failed = value
end

#descriptionObject



217
218
219
# File 'lib/rpush/daemon/gcm/delivery.rb', line 217

def description
  @description ||= describe
end

Instance Method Details

#<<(item) ⇒ Object



213
214
215
# File 'lib/rpush/daemon/gcm/delivery.rb', line 213

def <<(item)
  self[:all] << item
end

#any?Boolean

Returns:

  • (Boolean)


221
222
223
# File 'lib/rpush/daemon/gcm/delivery.rb', line 221

def any?
  self[:all].any?
end

#eachObject



209
210
211
# File 'lib/rpush/daemon/gcm/delivery.rb', line 209

def each
  self[:all].each { |x| yield x }
end