Module: GrowlCar::GrowlNotification

Included in:
Client
Defined in:
lib/growl_car/growl_notification.rb

Instance Method Summary collapse

Instance Method Details

#send_growl_notification(from, message) ⇒ Boolean

Sends a notification to the boxcar.io growl provider

Parameters:

  • from (String)

    name of the sender of the message

  • message (String)

    message to be sent to boxcar

Returns:

  • (Boolean)

    on successful notification

Raises:



11
12
13
14
15
16
17
18
19
# File 'lib/growl_car/growl_notification.rb', line 11

def send_growl_notification(from, message)
  boxcar_post_fields = {
    "notification[from_screen_name]" => from,
    "notification[message]" => message,
    "notification[from_remote_service_id]" => random_growl_number
  }

  post_notification(boxcar_post_fields)
end