Sha256: 0a0158c555c0c71a4a5fb8450af6d3a0cfec57d44683c6bf656deec48639d9e4

Contents?: true

Size: 514 Bytes

Versions: 21

Compression:

Stored size: 514 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)
        puts 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

21 entries across 21 versions & 1 rubygems

Version Path
linner-0.6.3 lib/linner/notifier.rb