lib/riot_notifier/module.rb in riot_notifier-0.0.7 vs lib/riot_notifier/module.rb in riot_notifier-0.0.8
- old
+ new
@@ -14,9 +14,21 @@
def self.new(*args, &block)
notifier_class = notifier_classes.detect(&:usable?) || None
notifier_class.new(*args, &block)
end
+ def self.register(notifier)
+ order.unshift notifier
+ end
+
+ def self.unregister(notifier)
+ order.delete notifier
+ end
+
+ def self.unregister_all
+ order.clear
+ end
+
def self.order
@order ||= []
end
def self.try(*order)