module MNotification
Public Class Methods
notification_controller=(controller)
click to toggle source
# File lib/bull/notification.rb, line 8 def self.notification_controller= controller @notifications = controller end
notifications()
click to toggle source
# File lib/bull/notification.rb, line 12 def self.notifications @notifications end
Public Instance Methods
notifications()
click to toggle source
# File lib/bull/notification.rb, line 4 def notifications MNotification.notifications end
notify_error(msg, level=10)
click to toggle source
# File lib/bull/notification.rb, line 21 def notify_error msg, level=10 puts msg notifications.add ['error', msg, level] if !notifications.nil? end
notify_info(msg, level=10)
click to toggle source
# File lib/bull/notification.rb, line 26 def notify_info msg, level=10 puts msg notifications.add ['info', msg, level] if !notifications.nil? end
notify_ok(msg, level=10)
click to toggle source
# File lib/bull/notification.rb, line 16 def notify_ok msg, level=10 puts msg notifications.add ['ok', msg, level] if !notifications.nil? end