Class: TinyAPNS::Connection
- Inherits:
-
Object
- Object
- TinyAPNS::Connection
- Defined in:
- lib/tiny_apns.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ Connection
constructor
A new instance of Connection.
- #open_for_delivery(options = {}, &block) ⇒ Object
- #open_for_feedback(options = {}, &block) ⇒ Object
Constructor Details
#initialize(options) ⇒ Connection
Returns a new instance of Connection.
63 64 65 66 |
# File 'lib/tiny_apns.rb', line 63 def initialize() .assert_valid_keys(:cert, :port, :host, :passphrase, :feedback_host, :gateway_host, :sandbox) @options=.with_indifferent_access end |
Instance Method Details
#open_for_delivery(options = {}, &block) ⇒ Object
68 69 70 71 |
# File 'lib/tiny_apns.rb', line 68 def open_for_delivery( = {}, &block) =(:gateway, ) open(, &block) end |
#open_for_feedback(options = {}, &block) ⇒ Object
73 74 75 76 |
# File 'lib/tiny_apns.rb', line 73 def open_for_feedback( = {}, &block) =(:feedback, ) open(, &block) end |