lib/notifaction/notify.rb in notifaction-0.3.0 vs lib/notifaction/notify.rb in notifaction-0.3.0.1
- old
+ new
@@ -24,11 +24,11 @@
# Prints a pre-formatted error message to the console
def self.error(message, config = {})
handler = Notifaction::Type::Terminal.new
handler.error(message, config)
- handler.quit unless self.auto_quit_enabled(config)
+ handler.quit unless self.auto_quit_enabled(config, handler.user_conf)
end
# Prints a pre-formatted warning message to the console
def self.warning(message, config = {})
handler = Notifaction::Type::Terminal.new
@@ -102,9 +102,9 @@
puts "Deprecated as of #{version}, current #{Notifaction::VERSION}"
end
#
# @since 0.3.0
- def self.auto_quit_enabled(config)
- config[:auto_quit] == false || $config.conf["auto_quit"] == false
+ def self.auto_quit_enabled(config, user_conf)
+ config[:auto_quit] == false || user_conf.conf["auto_quit"] == false
end
end