Class: Apns::Persistent::Client

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/apns/persistent/client.rb

Direct Known Subclasses

FeedbackClient, PushClient

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(certificate:, passphrase: nil, sandbox: false) ⇒ Client

Returns a new instance of Client.



10
11
12
13
# File 'lib/apns/persistent/client.rb', line 10

def initialize(certificate: , passphrase: nil, sandbox: false)
  cer = File.read(certificate)
  @connection = Connection.new(self.class.gateway_uri(sandbox), cer, passphrase)
end

Class Method Details

.gateway_uri(sandbox) ⇒ Object



15
16
17
# File 'lib/apns/persistent/client.rb', line 15

def self.gateway_uri(sandbox)
  raise 'please inherit'
end