Class: HeyYouFcmPush::MessageObject::Notification
- Inherits:
-
Object
- Object
- HeyYouFcmPush::MessageObject::Notification
- Defined in:
- lib/hey_you_fcm_push/message_object/notification.rb
Constant Summary collapse
- TRANSLATED_KEYS =
%w[title body]
Instance Attribute Summary collapse
-
#to_h ⇒ Object
readonly
Returns the value of attribute to_h.
Instance Method Summary collapse
-
#initialize(title:, body:, image: nil) ⇒ Notification
constructor
A new instance of Notification.
Constructor Details
#initialize(title:, body:, image: nil) ⇒ Notification
Returns a new instance of Notification.
7 8 9 10 11 12 13 |
# File 'lib/hey_you_fcm_push/message_object/notification.rb', line 7 def initialize(title:, body:, image: nil) @to_h = { title: title, body: body, image: image }.compact end |
Instance Attribute Details
#to_h ⇒ Object (readonly)
Returns the value of attribute to_h.
6 7 8 |
# File 'lib/hey_you_fcm_push/message_object/notification.rb', line 6 def to_h @to_h end |