Class: Pyapns2::ProvisionedClient
- Inherits:
-
Object
- Object
- Pyapns2::ProvisionedClient
- Defined in:
- lib/pyapns2.rb
Instance Attribute Summary collapse
-
#app_id ⇒ Object
readonly
Returns the value of attribute app_id.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
-
#feedback ⇒ Object
See Pyapns2::Client#feedback, with the exception this version prefills in the app_id.
-
#initialize(client, app_id) ⇒ ProvisionedClient
constructor
A new instance of ProvisionedClient.
- #inspect ⇒ Object
-
#notify(token, notification = nil) ⇒ Object
See Pyapns2::Client#notify, with the exception this version prefills in the app_id.
Constructor Details
#initialize(client, app_id) ⇒ ProvisionedClient
16 17 18 19 |
# File 'lib/pyapns2.rb', line 16 def initialize(client, app_id) @client = client @app_id = app_id end |
Instance Attribute Details
#app_id ⇒ Object (readonly)
Returns the value of attribute app_id.
14 15 16 |
# File 'lib/pyapns2.rb', line 14 def app_id @app_id end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
14 15 16 |
# File 'lib/pyapns2.rb', line 14 def client @client end |
Instance Method Details
#feedback ⇒ Object
See Pyapns2::Client#feedback, with the exception this version prefills in the app_id.
27 28 29 |
# File 'lib/pyapns2.rb', line 27 def feedback client.feedback app_id end |
#inspect ⇒ Object
31 32 33 |
# File 'lib/pyapns2.rb', line 31 def inspect "#<#{self.class.name} server=#{host}:#{port}, app_id=#{app_id}>" end |
#notify(token, notification = nil) ⇒ Object
See Pyapns2::Client#notify, with the exception this version prefills in the app_id.
22 23 24 |
# File 'lib/pyapns2.rb', line 22 def notify(token, notification = nil) client.notify app_id, token, notification end |