class Adhd_Osx::Notification
Public Class Methods
notify(**hash)
click to toggle source
Displays a notification in OS X Notification
Center
# File lib/adhd_osx.rb, line 6 def self.notify(**hash) command = 'osascript -e \'display notification "%s"' % hash[:body] command += 'with title "%s"' % hash[:title] if hash[:title] command += 'subtitle "%s"' % hash[:subtitle] if hash[:subtitle] command += 'sound name "%s"' % hash[:sound] if hash[:sound] command += "\'" exec command end