Module: NotifyPush
- Defined in:
- lib/notify-push.rb
Overview
MODULE->NOTIFY-PUSH —————————-
Defined Under Namespace
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 —————————
30 31 32 33 34 35 36 |
# File 'lib/notify-push.rb', line 30 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 —————————————–
41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/notify-push.rb', line 41 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 |