Class: GCM::Result
- Inherits:
-
Object
- Object
- GCM::Result
- Includes:
- ActiveModel::Model
- Defined in:
- lib/mercurius/gcm/result.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#message_id ⇒ Object
Returns the value of attribute message_id.
-
#registration_id ⇒ Object
Returns the value of attribute registration_id.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
- #canonical_id ⇒ Object
- #fail? ⇒ Boolean
- #has_canonical_id? ⇒ Boolean
-
#initialize(attributes, token) ⇒ Result
constructor
A new instance of Result.
- #success? ⇒ Boolean
Constructor Details
#initialize(attributes, token) ⇒ Result
Returns a new instance of Result.
8 9 10 11 |
# File 'lib/mercurius/gcm/result.rb', line 8 def initialize(attributes, token) super attributes @token = token end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
5 6 7 |
# File 'lib/mercurius/gcm/result.rb', line 5 def error @error end |
#message_id ⇒ Object
Returns the value of attribute message_id.
5 6 7 |
# File 'lib/mercurius/gcm/result.rb', line 5 def end |
#registration_id ⇒ Object
Returns the value of attribute registration_id.
5 6 7 |
# File 'lib/mercurius/gcm/result.rb', line 5 def registration_id @registration_id end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
6 7 8 |
# File 'lib/mercurius/gcm/result.rb', line 6 def token @token end |
Instance Method Details
#canonical_id ⇒ Object
21 22 23 |
# File 'lib/mercurius/gcm/result.rb', line 21 def canonical_id registration_id end |
#fail? ⇒ Boolean
17 18 19 |
# File 'lib/mercurius/gcm/result.rb', line 17 def fail? !success? end |
#has_canonical_id? ⇒ Boolean
25 26 27 |
# File 'lib/mercurius/gcm/result.rb', line 25 def has_canonical_id? canonical_id.present? end |
#success? ⇒ Boolean
13 14 15 |
# File 'lib/mercurius/gcm/result.rb', line 13 def success? .present? end |