Class: ActiveNotifier::Transports::Pushmeup::Deliverable
- Inherits:
-
Object
- Object
- ActiveNotifier::Transports::Pushmeup::Deliverable
- Defined in:
- lib/active_notifier/transports/pushmeup.rb
Instance Attribute Summary collapse
-
#network ⇒ Object
Returns the value of attribute network.
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#tokens ⇒ Object
Returns the value of attribute tokens.
Instance Method Summary collapse
- #deliver_later ⇒ Object
- #deliver_now ⇒ Object
-
#initialize(tokens, payload, network) ⇒ Deliverable
constructor
A new instance of Deliverable.
Constructor Details
#initialize(tokens, payload, network) ⇒ Deliverable
Returns a new instance of Deliverable.
67 68 69 70 71 |
# File 'lib/active_notifier/transports/pushmeup.rb', line 67 def initialize(tokens, payload, network) @payload = payload @tokens = tokens @network = network end |
Instance Attribute Details
#network ⇒ Object
Returns the value of attribute network.
65 66 67 |
# File 'lib/active_notifier/transports/pushmeup.rb', line 65 def network @network end |
#payload ⇒ Object
Returns the value of attribute payload.
65 66 67 |
# File 'lib/active_notifier/transports/pushmeup.rb', line 65 def payload @payload end |
#tokens ⇒ Object
Returns the value of attribute tokens.
65 66 67 |
# File 'lib/active_notifier/transports/pushmeup.rb', line 65 def tokens @tokens end |
Instance Method Details
#deliver_later ⇒ Object
77 78 79 |
# File 'lib/active_notifier/transports/pushmeup.rb', line 77 def deliver_later PushNotificationJob.perform_later(tokens, payload, network) end |
#deliver_now ⇒ Object
73 74 75 |
# File 'lib/active_notifier/transports/pushmeup.rb', line 73 def deliver_now ActiveNotifier::Transports::Pushmeup.deliver(tokens, payload, network) end |