Module: Sidekick::Actions::UserInteraction

Defined in:
lib/sidekick/actions/user_interaction.rb

Instance Method Summary collapse

Instance Method Details

#notify(message, title = 'Sidekick') ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/sidekick/actions/user_interaction.rb', line 3

def notify(message, title='Sidekick')

  log "NOTIFY #{title}: #{message}"
  case platform
    when :linux
      needs 'libnotify', 'to display status messages on linux'
      Libnotify.show :body => message, :summary => title
    when :darwin
      needs 'growl', 'to display status messages on a Mac.'
      Growl.notify message, :title => title, :name => 'Sidekick'
  end
end