Class: TinyAPNS::Connection

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

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Connection

Returns a new instance of Connection.



63
64
65
66
# File 'lib/tiny_apns.rb', line 63

def initialize(options)
  options.assert_valid_keys(:cert, :port, :host, :passphrase, :feedback_host, :gateway_host, :sandbox)
  @options=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(options = {}, &block)
  local_options=get_options(:gateway, options)
  open(local_options, &block)
end

#open_for_feedback(options = {}, &block) ⇒ Object



73
74
75
76
# File 'lib/tiny_apns.rb', line 73

def open_for_feedback(options = {}, &block)
  local_options=get_options(:feedback, options)
  open(local_options, &block)
end