Class: Maia::FCM::Result
- Inherits:
-
Object
- Object
- Maia::FCM::Result
- Includes:
- ActiveModel::Model
- Defined in:
- lib/maia/fcm/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.
9 10 11 12 |
# File 'lib/maia/fcm/result.rb', line 9 def initialize(attributes, token) super attributes @token = token end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
6 7 8 |
# File 'lib/maia/fcm/result.rb', line 6 def error @error end |
#message_id ⇒ Object
Returns the value of attribute message_id.
6 7 8 |
# File 'lib/maia/fcm/result.rb', line 6 def @message_id end |
#registration_id ⇒ Object
Returns the value of attribute registration_id.
6 7 8 |
# File 'lib/maia/fcm/result.rb', line 6 def registration_id @registration_id end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
7 8 9 |
# File 'lib/maia/fcm/result.rb', line 7 def token @token end |
Instance Method Details
#canonical_id ⇒ Object
22 23 24 |
# File 'lib/maia/fcm/result.rb', line 22 def canonical_id registration_id end |
#fail? ⇒ Boolean
18 19 20 |
# File 'lib/maia/fcm/result.rb', line 18 def fail? !success? end |
#has_canonical_id? ⇒ Boolean
26 27 28 |
# File 'lib/maia/fcm/result.rb', line 26 def has_canonical_id? canonical_id.present? end |
#success? ⇒ Boolean
14 15 16 |
# File 'lib/maia/fcm/result.rb', line 14 def success? .present? end |