class CodeKindly::Utils::OS
Public Class Methods
notify(message)
click to toggle source
# File lib/code_kindly/utils/os.rb, line 7 def notify(message) return if terminal_notifier.nil? Command.run [ terminal_notifier, "-message \"#{message}\"", '-sound Submarine' ].join(' ') end
which(program)
click to toggle source
# File lib/code_kindly/utils/os.rb, line 16 def which(program) Command.run("which #{program}").result end
Private Class Methods
terminal_notifier()
click to toggle source
# File lib/code_kindly/utils/os.rb, line 22 def terminal_notifier unless instance_variable_defined? :@terminal_notifier @terminal_notifer = which('terminal-notifier') end @terminal_notifier end