Class: Pushing::Platforms::FcmPayload
- Inherits:
-
Object
- Object
- Pushing::Platforms::FcmPayload
- Defined in:
- lib/pushing/platforms.rb
Instance Attribute Summary collapse
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(payload) ⇒ FcmPayload
constructor
A new instance of FcmPayload.
- #recipients ⇒ Object
Constructor Details
#initialize(payload) ⇒ FcmPayload
Returns a new instance of FcmPayload.
86 87 88 |
# File 'lib/pushing/platforms.rb', line 86 def initialize(payload, *) @payload = payload end |
Instance Attribute Details
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
80 81 82 |
# File 'lib/pushing/platforms.rb', line 80 def payload @payload end |
Class Method Details
.should_render?(options) ⇒ Boolean
82 83 84 |
# File 'lib/pushing/platforms.rb', line 82 def self.should_render?() .present? end |
Instance Method Details
#recipients ⇒ Object
90 91 92 |
# File 'lib/pushing/platforms.rb', line 90 def recipients Array(payload[:to] || payload[:registration_ids]) end |