Class: Linner::Notifier

Inherits:
Object
  • Object
show all
Defined in:
lib/linner/notifier.rb

Class Method Summary collapse

Class Method Details

.error(message) ⇒ Object



12
13
14
15
16
17
# File 'lib/linner/notifier.rb', line 12

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

.exitObject



19
20
21
# File 'lib/linner/notifier.rb', line 19

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

.profileObject



6
7
8
9
10
# File 'lib/linner/notifier.rb', line 6

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