Class: Rapns::Daemon::Gcm::DeliveryHandler
- Inherits:
-
DeliveryHandler
- Object
- DeliveryHandler
- Rapns::Daemon::Gcm::DeliveryHandler
- Defined in:
- lib/rapns/daemon/gcm/delivery_handler.rb
Instance Attribute Summary
Attributes inherited from DeliveryHandler
Instance Method Summary collapse
- #deliver(notification) ⇒ Object
-
#initialize(app) ⇒ DeliveryHandler
constructor
A new instance of DeliveryHandler.
- #stopped ⇒ Object
Methods inherited from DeliveryHandler
Methods included from Reflectable
Constructor Details
#initialize(app) ⇒ DeliveryHandler
Returns a new instance of DeliveryHandler.
5 6 7 8 |
# File 'lib/rapns/daemon/gcm/delivery_handler.rb', line 5 def initialize(app) @app = app @http = Net::HTTP::Persistent.new('rapns') end |
Instance Method Details
#deliver(notification) ⇒ Object
10 11 12 |
# File 'lib/rapns/daemon/gcm/delivery_handler.rb', line 10 def deliver(notification) Rapns::Daemon::Gcm::Delivery.perform(@app, @http, notification) end |
#stopped ⇒ Object
14 15 16 |
# File 'lib/rapns/daemon/gcm/delivery_handler.rb', line 14 def stopped @http.shutdown end |