groupme/em-apn — pull request #6 by daveyeu (2011-12-02 00:06:09+00:00)
Title: Separate client and connection classes

First, this breaks the existing API entirely. The old `EM::APN.push`
interface is gone. While convenient, that method didn't expose any of the
callbacks and I believe that the new API is simple enough to warrant its
removal.

The new API looks like this:

```ruby
notification = EM::APN::Notification.new(token, :alert => alert)

client = EM::APN::Client.connect
client.deliver(notification)

client.on_error do |response|
# Do something
end

client.on_close do
# Do something else
end
```