Class: Grocer::Pusher

Inherits:
Object
  • Object
show all
Defined in:
lib/grocer/pusher.rb

Instance Method Summary collapse

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