Module: AutoSnarl

Defined in:
lib/autosnarl.rb

Class Method Summary collapse

Class Method Details

.iconObject



4
5
6
7
8
9
10
11
12
# File 'lib/autosnarl.rb', line 4

def self.icon
  # icons from http://www.famfamfam.com/lab/icons/silk/
  path = File.join(File.dirname(__FILE__), "/../icons")
  {
    :green => "#{path}/accept.png",
    :red    => "#{path}/exclamation.png",
    :info   => "#{path}/information.png"
  }
end

.snarl(title, msg, ico = nil) ⇒ Object



14
15
16
# File 'lib/autosnarl.rb', line 14

def self.snarl title, msg, ico = nil
  Snarl.show_message(title, msg, icon[ico])
end