Module: APND

Defined in:
lib/apnd.rb,
lib/apnd/cli.rb,
lib/apnd/daemon.rb,
lib/apnd/errors.rb,
lib/apnd/version.rb,
lib/apnd/feedback.rb,
lib/apnd/settings.rb,
lib/apnd/notification.rb,
lib/apnd/daemon/protocol.rb,
lib/apnd/daemon/apple_connection.rb,
lib/apnd/daemon/server_connection.rb

Defined Under Namespace

Modules: Errors Classes: CLI, Daemon, Feedback, Notification, Settings, Version

Class Method Summary collapse

Class Method Details

.configure {|settings| ... } ⇒ Object

Yields APND::Settings

Yields:



22
23
24
# File 'lib/apnd.rb', line 22

def self.configure
  yield settings
end

.logger(message) ⇒ Object

Write message to stdout with date



29
30
31
# File 'lib/apnd.rb', line 29

def self.logger(message) #:nodoc:
  puts "[%s] %s" % [Time.now.strftime("%Y-%m-%d %H:%M:%S"), message]
end

.settingsObject

Returns APND::Settings



15
16
17
# File 'lib/apnd.rb', line 15

def self.settings
  @@settings ||= Settings.new
end