Class: Sicily::Util::NotificationUtil

Inherits:
Object
  • Object
show all
Defined in:
lib/sicily/util/notification_util.rb

Class Method Summary collapse

Class Method Details

.file_names(files) ⇒ Object



20
21
22
23
24
# File 'lib/sicily/util/notification_util.rb', line 20

def self.file_names(files)
  files.map do |file|
    File.basename(file)
  end.join(', ')
end

.notify_beginning(files) ⇒ Object



8
9
10
11
12
# File 'lib/sicily/util/notification_util.rb', line 8

def self.notify_beginning(files)
  msg = file_names(files)
  title = "Beginning processing #{files.size} file(s)"
  TerminalNotifier.notify(msg, title: title)
end

.notify_done(files) ⇒ Object



14
15
16
17
18
# File 'lib/sicily/util/notification_util.rb', line 14

def self.notify_done(files)
  msg = file_names(files)
  title = "Finished processing #{files.size} file(s)"
  TerminalNotifier.notify(msg, title: title)
end