module NotifyPush


MODULE->NOTIFY-PUSH —————————-



MODULE->NOTIFY-PUSH —————————-



MODULE->NOTIFY-PUSH —————————-



MODULE->NOTIFY-PUSH —————————-


Constants

CHANNEL_NAME
CONFIGURATION_FILE_PATH
VERSION

CONSTANTS ————————————


Public Class Methods

initialize_configuration() click to toggle source

USER-CONFIGURATION —————————


# File lib/notify-push.rb, line 69
def self.initialize_configuration()
  unless File.exist? CONFIGURATION_FILE_PATH
    raise "Configuration file does not exist at '#{CONFIGURATION_FILE_PATH}'."
  end

  self.configuration = RecursiveOpenStruct.new(YAML.load_file(CONFIGURATION_FILE_PATH))
end
main(type, *args) click to toggle source

MAIN —————————————–


# File lib/notify-push.rb, line 87
def self.main(type, *args)
  begin
    initialize_configuration

    case type
    when :receiver, :receive
      return NotifyPush::Receiver.start *args
    when :sender, :send
      return NotifyPush::Sender.send_notification *args
    end

  rescue => exception
    puts "fatal: #{exception.to_s}"
    exit 1
  end
end
on_at_exit() click to toggle source

CALLBACKS ————————————


# File lib/notify-push.rb, line 80
def self.on_at_exit
  self.acting_as.try(:on_at_exit)
end