Class: RubyPushNotifications::GCM::GCMCanonicalIDResult
- Defined in:
- lib/ruby-push-notifications/gcm/gcm_result.rb
Overview
Indicates that the notification was successfully sent to the corresponding registration ID but GCM sent a canonical ID for it, so the received canonical ID should be used as registration ID ASAP.
Instance Attribute Summary collapse
-
#canonical_id ⇒ String
readonly
. The suggested canonical ID from GCM.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(canonical_id) ⇒ GCMCanonicalIDResult
constructor
A new instance of GCMCanonicalIDResult.
Constructor Details
#initialize(canonical_id) ⇒ GCMCanonicalIDResult
Returns a new instance of GCMCanonicalIDResult.
27 28 29 |
# File 'lib/ruby-push-notifications/gcm/gcm_result.rb', line 27 def initialize(canonical_id) @canonical_id = canonical_id end |
Instance Attribute Details
#canonical_id ⇒ String (readonly)
Returns . The suggested canonical ID from GCM.
25 26 27 |
# File 'lib/ruby-push-notifications/gcm/gcm_result.rb', line 25 def canonical_id @canonical_id end |
Instance Method Details
#==(other) ⇒ Object
31 32 33 34 |
# File 'lib/ruby-push-notifications/gcm/gcm_result.rb', line 31 def ==(other) (other.is_a?(GCMCanonicalIDResult) && @canonical_id == other.canonical_id) || super(other) end |