module RakeNotification
Constants
- VERSION
Public Class Methods
config_path()
click to toggle source
# File lib/rake_notification.rb, line 5 def self.config_path './config/rake_notification' end
Public Instance Methods
reconstructed_command_line()
click to toggle source
# File lib/rake_notification.rb, line 9 def reconstructed_command_line @reconstructed_command_line ||= "#{File.basename($0)} #{ARGV.join(' ')}" end
register_interceptor(interceptor)
click to toggle source
# File lib/rake_notification.rb, line 17 def register_interceptor(interceptor) notification_interceptors << interceptor end
register_observer(observer)
click to toggle source
# File lib/rake_notification.rb, line 13 def register_observer(observer) notification_observers << observer end
top_level()
click to toggle source
Calls superclass method
# File lib/rake_notification.rb, line 21 def top_level inform_interceptors rescue nil super rescue SystemExit => original_error inform_observers(original_error) rescue nil raise original_error rescue Exception => original_error inform_observers(SystemExit.new(1, original_error.message)) rescue nil raise original_error else inform_observers rescue nil end
Private Instance Methods
inform_interceptors()
click to toggle source
# File lib/rake_notification.rb, line 37 def inform_interceptors notification_interceptors.each do |interceptor| interceptor.started_task(self) end end
inform_observers(system_exit=SystemExit.new(0))
click to toggle source
# File lib/rake_notification.rb, line 43 def inform_observers(system_exit=SystemExit.new(0)) notification_observers.each do |observer| observer.completed_task(self, system_exit) end end
notification_interceptors()
click to toggle source
# File lib/rake_notification.rb, line 49 def notification_interceptors @notification_interceptors ||= [] end
notification_observers()
click to toggle source
# File lib/rake_notification.rb, line 53 def notification_observers @notification_observers ||= [] end