lib/linner/notifier.rb in linner-0.1.0 vs lib/linner/notifier.rb in linner-0.1.1
- old
+ new
@@ -1,23 +1,24 @@
require "terminal-notifier"
module Linner
class Notifier
+ class << self
+ def info
+ time = Time.now
+ yield
+ puts "š : Done in #{'%.3f' % (Time.now - time)}s."
+ end
- def self.info
- time = Time.now
- yield
- puts "š : Done in #{'%.3f' % (Time.now - time)}s."
- end
-
- def self.error(message)
- puts message = "š» : #{message}!"
- if Linner.environment.notifications && TerminalNotifier.available?
- TerminalNotifier.notify message, :title => 'Linner'
+ def error(message)
+ puts message = "š» : #{message}!"
+ if Linner.environment.notifications && TerminalNotifier.available?
+ TerminalNotifier.notify message, :title => 'Linner'
+ end
end
- end
- def self.exit
- puts "\ršµ : Let's take a break!"
+ def exit
+ puts "\ršµ : Let's take a break!"
+ end
end
end
end