Class: Maia::FCM::Notification
- Inherits:
-
Object
- Object
- Maia::FCM::Notification
- Defined in:
- lib/maia/fcm/notification.rb
Instance Method Summary collapse
- #body ⇒ Object
- #image ⇒ Object
-
#initialize(message) ⇒ Notification
constructor
A new instance of Notification.
- #title ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize(message) ⇒ Notification
Returns a new instance of Notification.
4 5 6 |
# File 'lib/maia/fcm/notification.rb', line 4 def initialize() @message = end |
Instance Method Details
#body ⇒ Object
12 13 14 |
# File 'lib/maia/fcm/notification.rb', line 12 def body @message.body end |
#image ⇒ Object
16 17 18 |
# File 'lib/maia/fcm/notification.rb', line 16 def image @message.image end |
#title ⇒ Object
8 9 10 |
# File 'lib/maia/fcm/notification.rb', line 8 def title @message.title end |
#to_h ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/maia/fcm/notification.rb', line 20 def to_h { title: title, body: body, image: image }.compact end |