Class: Firebase::Messaging::Request::Body::Notification
- Inherits:
-
Object
- Object
- Firebase::Messaging::Request::Body::Notification
- Defined in:
- lib/firebase/messaging/request/body.rb
Instance Attribute Summary collapse
-
#badge ⇒ Object
Returns the value of attribute badge.
-
#body ⇒ Object
Returns the value of attribute body.
-
#icon ⇒ Object
Returns the value of attribute icon.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
Instance Attribute Details
#badge ⇒ Object
Returns the value of attribute badge.
28 29 30 |
# File 'lib/firebase/messaging/request/body.rb', line 28 def badge @badge end |
#body ⇒ Object
Returns the value of attribute body.
28 29 30 |
# File 'lib/firebase/messaging/request/body.rb', line 28 def body @body end |
#icon ⇒ Object
Returns the value of attribute icon.
28 29 30 |
# File 'lib/firebase/messaging/request/body.rb', line 28 def icon @icon end |
#title ⇒ Object
Returns the value of attribute title.
28 29 30 |
# File 'lib/firebase/messaging/request/body.rb', line 28 def title @title end |
Instance Method Details
#payload ⇒ Object
30 31 32 33 34 |
# File 'lib/firebase/messaging/request/body.rb', line 30 def payload instance_variables.select { |key| !instance_variable_get(key).nil? }.each_with_object({}) do |key, payload| payload[key.to_s.delete('@').to_sym] = instance_variable_get(key) end end |