Sha256: fda45a9c7417efcd24834bbd24f37b30a4fd6c0fb3e351aaa5e6dce42147f7c8

Contents?: true

Size: 515 Bytes

Versions: 2

Compression:

Stored size: 515 Bytes

Contents

require "terminal-notifier"

module Linner
  class Notifier
    class << self
      def profile
        time = Time.now
        yield
        puts "šŸœ : Done in #{"%.3f" % (Time.now - time)}s."
      end

      def error(message)
        abort message = "šŸ‘» : #{message}!"
        if Linner.env.notification && TerminalNotifier.available?
          TerminalNotifier.notify message, :title => "Linner"
        end
      end

      def exit
        puts "\ršŸµ : Let's take a break!"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
linner-hc-1.0.0 lib/linner/notifier.rb
linner-0.11.1 lib/linner/notifier.rb