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.



191
192
193
# File 'lib/rpush/daemon/gcm/delivery.rb', line 191

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.



189
190
191
# File 'lib/rpush/daemon/gcm/delivery.rb', line 189

def all_failed=(value)
  @all_failed = value
end

#descriptionObject



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

def description
  @description ||= describe
end

Instance Method Details

#<<(item) ⇒ Object



199
200
201
# File 'lib/rpush/daemon/gcm/delivery.rb', line 199

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

#any?Boolean

Returns:

  • (Boolean)


207
208
209
# File 'lib/rpush/daemon/gcm/delivery.rb', line 207

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

#eachObject



195
196
197
# File 'lib/rpush/daemon/gcm/delivery.rb', line 195

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