Module: NotifyPush
- Defined in:
- lib/notify-push.rb
Overview
MODULE->NOTIFY-PUSH —————————-
Defined Under Namespace
Modules: Receiver, Sender, Utility
Constant Summary collapse
- CHANNEL_NAME =
CONSTANTS ————————————
"notify-push"- CONFIGURATION_FILE_PATH =
"#{ENV["HOME"]}/.notify-pushrc"
Class Method Summary collapse
-
.initialize_configuration ⇒ Object
———————————————- USER-CONFIGURATION ————————— ———————————————-.
-
.main ⇒ Object
———————————————- MAIN —————————————– ———————————————-.
Class Method Details
.initialize_configuration ⇒ Object
USER-CONFIGURATION —————————
54 55 56 57 58 59 60 |
# File 'lib/notify-push.rb', line 54 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 ⇒ Object
MAIN —————————————–
65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/notify-push.rb', line 65 def self.main() begin initialize_configuration if ["--receiver", "-r"].member? ARGV[0] return NotifyPush::Receiver.start end NotifyPush::Sender.start rescue => exception puts "fatal: #{exception.to_s}" exit 1 end end |