lib/linner/notifier.rb in linner-0.11.1 vs lib/linner/notifier.rb in linner-0.11.2
- old
+ new
@@ -7,14 +7,19 @@
time = Time.now
yield
puts "š : Done in #{"%.3f" % (Time.now - time)}s."
end
- def error(message)
- abort message = "š» : #{message}!"
+ def notify(message)
if Linner.env.notification && TerminalNotifier.available?
TerminalNotifier.notify message, :title => "Linner"
end
+ puts "š» : #{message}!"
+ end
+
+ def error(message)
+ self.notify(message)
+ abort
end
def exit
puts "\ršµ : Let's take a break!"
end