Class: PushNotifications::UseCases::Notify
- Inherits:
-
Object
- Object
- PushNotifications::UseCases::Notify
- Includes:
- Caze
- Defined in:
- lib/push_notifications/use_cases/notify.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(interests:, payload: {}) ⇒ Notify
constructor
A new instance of Notify.
Constructor Details
#initialize(interests:, payload: {}) ⇒ Notify
Returns a new instance of Notify.
12 13 14 15 |
# File 'lib/push_notifications/use_cases/notify.rb', line 12 def initialize(interests:, payload: {}) @interests = interests @payload = payload end |
Instance Method Details
#call ⇒ Object
17 18 19 20 |
# File 'lib/push_notifications/use_cases/notify.rb', line 17 def call data = { interests: interests }.merge!(payload) client.post('publishes', data) end |