Sha256: b8f612649bb75a7783927887e51473c7db2da902f5ba1250ad2dda8559fb73d5

Contents?: true

Size: 584 Bytes

Versions: 6

Compression:

Stored size: 584 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 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
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
linner-0.12.0 lib/linner/notifier.rb
linner-0.11.6 lib/linner/notifier.rb
linner-0.11.5 lib/linner/notifier.rb
linner-0.11.4 lib/linner/notifier.rb
linner-0.11.3 lib/linner/notifier.rb
linner-0.11.2 lib/linner/notifier.rb