Class: Pushr::ConfigurationApns2
- Inherits:
-
Configuration
- Object
- Configuration
- Pushr::ConfigurationApns2
- Defined in:
- lib/pushr/configuration_apns2.rb
Instance Attribute Summary collapse
-
#key_id ⇒ Object
Returns the value of attribute key_id.
-
#private_key ⇒ Object
Returns the value of attribute private_key.
-
#sandbox ⇒ Object
Returns the value of attribute sandbox.
-
#team_id ⇒ Object
Returns the value of attribute team_id.
Instance Method Summary collapse
Instance Attribute Details
#key_id ⇒ Object
Returns the value of attribute key_id.
3 4 5 |
# File 'lib/pushr/configuration_apns2.rb', line 3 def key_id @key_id end |
#private_key ⇒ Object
Returns the value of attribute private_key.
3 4 5 |
# File 'lib/pushr/configuration_apns2.rb', line 3 def private_key @private_key end |
#sandbox ⇒ Object
Returns the value of attribute sandbox.
3 4 5 |
# File 'lib/pushr/configuration_apns2.rb', line 3 def sandbox @sandbox end |
#team_id ⇒ Object
Returns the value of attribute team_id.
3 4 5 |
# File 'lib/pushr/configuration_apns2.rb', line 3 def team_id @team_id end |
Instance Method Details
#certificate=(value) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/pushr/configuration_apns2.rb', line 11 def certificate=(value) if /BEGIN CERTIFICATE/.match(value) @certificate = value else # assume it's the path to the certificate and try to read it: @certificate = read_file(value) end end |
#name ⇒ Object
7 8 9 |
# File 'lib/pushr/configuration_apns2.rb', line 7 def name :apns2 end |
#to_hash ⇒ Object
20 21 22 23 |
# File 'lib/pushr/configuration_apns2.rb', line 20 def to_hash { type: self.class.to_s, app: app, enabled: enabled, connections: connections, private_key: private_key, team_id: team_id, key_id: key_id, sandbox: sandbox } end |