Class: APND::Settings
- Inherits:
-
Object
- Object
- APND::Settings
- Defined in:
- lib/apnd/settings.rb
Overview
Settings for APND
Defined Under Namespace
Classes: AppleConnection, Daemon, Feedback, Notification
Instance Method Summary collapse
-
#apple ⇒ Object
Returns the AppleConnection settings.
-
#apple=(options = {}) ⇒ Object
Mass assign AppleConnection settings.
-
#daemon ⇒ Object
Returns the Daemon settings.
-
#daemon=(options = {}) ⇒ Object
Mass assign Daemon settings.
-
#feedback ⇒ Object
Returns the Feedback settings.
-
#feedback=(options = {}) ⇒ Object
Mass assign Feedback settings.
-
#notification ⇒ Object
Returns the Notification settings.
-
#notification=(options = {}) ⇒ Object
Mass assign Notification settings.
Instance Method Details
#apple ⇒ Object
Returns the AppleConnection settings
136 137 138 |
# File 'lib/apnd/settings.rb', line 136 def apple @apple ||= APND::Settings::AppleConnection.new end |
#apple=(options = {}) ⇒ Object
Mass assign AppleConnection settings
143 144 145 146 147 148 149 150 |
# File 'lib/apnd/settings.rb', line 143 def apple=( = {}) if .respond_to?(:keys) apple.cert = [:cert] if [:cert] apple.cert_pass = [:cert_pass] if [:cert_pass] apple.host = [:host] if [:host] apple.port = [:port] if [:port] end end |
#daemon ⇒ Object
Returns the Daemon settings
155 156 157 |
# File 'lib/apnd/settings.rb', line 155 def daemon @daemon ||= APND::Settings::Daemon.new end |
#daemon=(options = {}) ⇒ Object
Mass assign Daemon settings
162 163 164 165 166 167 168 169 |
# File 'lib/apnd/settings.rb', line 162 def daemon=( = {}) if .respond_to?(:keys) daemon.bind = [:bind] if [:bind] daemon.port = [:port] if [:port] daemon.log_file = [:log_file] if [:log_file] daemon.timer = [:timer] if [:timer] end end |
#feedback ⇒ Object
Returns the Feedback settings
191 192 193 |
# File 'lib/apnd/settings.rb', line 191 def feedback @feedback ||= APND::Settings::Feedback.new end |
#feedback=(options = {}) ⇒ Object
Mass assign Feedback settings
198 199 200 201 202 203 |
# File 'lib/apnd/settings.rb', line 198 def feedback=( = {}) if .respond_to?(:keys) feedback.port = [:port] if [:port] feedback.host = [:host] if [:host] end end |
#notification ⇒ Object
Returns the Notification settings
174 175 176 |
# File 'lib/apnd/settings.rb', line 174 def notification @notification ||= APND::Settings::Notification.new end |
#notification=(options = {}) ⇒ Object
Mass assign Notification settings
181 182 183 184 185 186 |
# File 'lib/apnd/settings.rb', line 181 def notification=( = {}) if .respond_to?(:keys) notification.port = [:port] if [:port] notification.host = [:host] if [:host] end end |