<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -67,7 +67,7 @@ module Growl
       end
     end
     
-    attr_reader :application_name, :application_icon, :notifications, :default_notifications
+    attr_reader :application_name, :notifications, :default_notifications
     
     def start(application_name, notifications, default_notifications = nil, application_icon = nil)
       @application_name, @notifications, @application_icon = application_name, notifications, application_icon
@@ -79,6 +79,22 @@ module Growl
       @application_icon ||= OSX::NSApplication.sharedApplication.applicationIconImage
     end
     
+    def notify(options)
+      dict = {
+        :ApplicationName =&gt; @application_name,
+        :ApplicationPID =&gt; pid,
+        :NotificationName =&gt; options[:name],
+        :NotificationTitle =&gt; options[:title],
+        :NotificationDescription =&gt; options[:description],
+        :NotificationPriority =&gt; options[:priority] || 0
+      }
+      dict[:NotificationIcon] = options[:icon] if options[:icon]
+      dict[:NotificationSticky] = 1 if options[:sticky]
+      dict[:NotificationClickContext] = options[:click_context] if options[:click_context]
+      
+      notification_center.postNotificationName_object_userInfo_deliverImmediately(:GrowlNotification, nil, dict, true)
+    end
+    
     private
     
     def pid</diff>
      <filename>lib/growl.rb</filename>
    </modified>
    <modified>
      <diff>@@ -136,4 +136,51 @@ describe &quot;Growl::Notifier.sharedInstance&quot; do
     @center.expects(:addObserver_selector_name_object).with(@instance, 'selector:', &quot;#{@name}-#{@pid}-name&quot;, nil)
     @instance.send(:add_observer, 'selector:', 'name', true)
   end
+  
+  it &quot;should send a notification to Growl&quot; do
+    another_icon = mock('Another icon')
+    
+    dict = {
+      :ApplicationName =&gt; @name,
+      :ApplicationPID =&gt; @pid,
+      :NotificationName =&gt; @notifications.first,
+      :NotificationTitle =&gt; 'title',
+      :NotificationDescription =&gt; 'description',
+      :NotificationPriority =&gt; 1,
+      :NotificationIcon =&gt; another_icon,
+      :NotificationSticky =&gt; 1,
+      :NotificationClickContext =&gt; 'click_context'
+    }
+    
+    @center.expects(:postNotificationName_object_userInfo_deliverImmediately).with(:GrowlNotification, nil, dict, true)
+    
+    @instance.notify(
+      :name =&gt; @notifications.first,
+      :title =&gt; 'title',
+      :description =&gt; 'description',
+      :click_context =&gt; 'click_context',
+      :sticky =&gt; true,
+      :priority =&gt; 1,
+      :icon =&gt; another_icon
+    )
+  end
+  
+  it &quot;should not require all options to be specified when sending a notification to Growl&quot; do
+    dict = {
+      :ApplicationName =&gt; @name,
+      :ApplicationPID =&gt; @pid,
+      :NotificationName =&gt; @notifications.first,
+      :NotificationTitle =&gt; 'title',
+      :NotificationDescription =&gt; 'description',
+      :NotificationPriority =&gt; 0
+    }
+    
+    @center.expects(:postNotificationName_object_userInfo_deliverImmediately).with(:GrowlNotification, nil, dict, true)
+    
+    @instance.notify(
+      :name =&gt; @notifications.first,
+      :title =&gt; 'title',
+      :description =&gt; 'description'
+    )
+  end
 end
\ No newline at end of file</diff>
      <filename>test/growl_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2eba4d83a9959c788c5926bb68d43e86fab3b6b2</id>
    </parent>
  </parents>
  <author>
    <name>Eloy Duran</name>
    <email>eloy.de.enige@gmail.com</email>
  </author>
  <url>http://github.com/psychs/growlnotifier/commit/a26dd31be2152abb41783de8211709952087e8c7</url>
  <id>a26dd31be2152abb41783de8211709952087e8c7</id>
  <committed-date>2008-07-25T16:42:15-07:00</committed-date>
  <authored-date>2008-07-25T16:42:15-07:00</authored-date>
  <message>Send notifications to Growl with the #notify method.</message>
  <tree>3cdc066f860c638fd54accaa30bc7f22c85b0a5f</tree>
  <committer>
    <name>Eloy Duran</name>
    <email>eloy.de.enige@gmail.com</email>
  </committer>
</commit>
