Class: Grocer::Pusher
- Inherits:
-
Object
- Object
- Grocer::Pusher
- Defined in:
- lib/grocer/pusher.rb
Instance Method Summary collapse
-
#initialize(connection) ⇒ Pusher
constructor
A new instance of Pusher.
- #push(notification) ⇒ Object
Constructor Details
#initialize(connection) ⇒ Pusher
Returns a new instance of Pusher.
3 4 5 |
# File 'lib/grocer/pusher.rb', line 3 def initialize(connection) @connection = connection end |
Instance Method Details
#push(notification) ⇒ Object
7 8 9 |
# File 'lib/grocer/pusher.rb', line 7 def push(notification) @connection.write(notification.to_bytes) end |