Class: CampfireBot::AbsenteeCamper::Notification::ProwlNotifier

Inherits:
Object
  • Object
show all
Includes:
Config, Helpers
Defined in:
lib/campfire_bot/absentee_camper/notification/prowl_notifier.rb

Instance Method Summary collapse

Methods included from Helpers

#room_uri

Methods included from Config

#plugin_config, #root_config

Constructor Details

#initialize(room, api_key) ⇒ ProwlNotifier

Returns a new instance of ProwlNotifier.



10
11
12
13
# File 'lib/campfire_bot/absentee_camper/notification/prowl_notifier.rb', line 10

def initialize(room, api_key)
  @api_key = api_key
  @room = room
end

Instance Method Details

#notify(message) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/campfire_bot/absentee_camper/notification/prowl_notifier.rb', line 15

def notify(message)
  Logger.instance.debug "sending prowl notification"
  Prowl.add(:apikey => @api_key,
            :application => 'Campfire',
            :event => @room.name,
            :description => message,
            :url => room_uri(@room))
end