Class: IOSPN::Configuration
- Inherits:
-
Object
- Object
- IOSPN::Configuration
- Defined in:
- lib/ios_push_notifications/configuration.rb
Instance Attribute Summary collapse
-
#feedback ⇒ Object
Returns the value of attribute feedback.
-
#notification ⇒ Object
Returns the value of attribute notification.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/ios_push_notifications/configuration.rb', line 5 def initialize @feedback = {} @notification = {} @notification = {:passphrase => '', :port => 2195} @feedback = {:passphrase => @notification[:passphrase], :port => 2196} if Rails.env.production? @notification[:host] = "gateway.push.apple.com" @notification[:cert] = File.join(Rails.root, 'config', 'apple_push_notification_production.pem') if Rails.root @feedback[:host] = "feedback.push.apple.com" @feedback[:cert] = @notification[:cert] else @notification[:host] = "gateway.sandbox.push.apple.com" @notification[:cert] = File.join(Rails.root, 'config', 'apple_push_notification_development.pem') if Rails.root @feedback[:host] = "feedback.sandbox.push.apple.com" @feedback[:cert] = @notification[:cert] end end |
Instance Attribute Details
#feedback ⇒ Object
Returns the value of attribute feedback.
3 4 5 |
# File 'lib/ios_push_notifications/configuration.rb', line 3 def feedback @feedback end |
#notification ⇒ Object
Returns the value of attribute notification.
3 4 5 |
# File 'lib/ios_push_notifications/configuration.rb', line 3 def notification @notification end |