Class: SimpleGCM::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_gcm/result.rb

Overview

Result of a GCM message request that returned HTTP status code 200.

There are cases when a request is accept and the message successfully created, but GCM has a canonical registration id for that device. In this case, the server should update the registration id to avoid rejected requests in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#message_idObject

Returns the value of attribute message_id.



10
11
12
# File 'lib/simple_gcm/result.rb', line 10

def message_id
  @message_id
end

#registration_idObject

Returns the value of attribute registration_id.



10
11
12
# File 'lib/simple_gcm/result.rb', line 10

def registration_id
  @registration_id
end

Instance Method Details

#inspectObject



11
12
13
# File 'lib/simple_gcm/result.rb', line 11

def inspect
  { message_id: message_id, registration_id: registration_id }
end

#to_sObject



14
15
16
# File 'lib/simple_gcm/result.rb', line 14

def to_s
  "#<#{self.class} #{inspect.to_s}>"
end