Class: AbsenteeCamper::ProwlNotifier

Inherits:
Object
  • Object
show all
Includes:
Logger
Defined in:
lib/absentee_camper/prowl_notifier.rb

Instance Method Summary collapse

Methods included from Logger

#log

Constructor Details

#initialize(api_key) ⇒ ProwlNotifier

Returns a new instance of ProwlNotifier.



7
8
9
# File 'lib/absentee_camper/prowl_notifier.rb', line 7

def initialize(api_key)
  @api_key = api_key
end

Instance Method Details

#notify(message) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/absentee_camper/prowl_notifier.rb', line 11

def notify(message)
  log "sending prowl notification"
  Prowl.add(:apikey => @api_key,
            :application => 'Absentee Camper',
            :event => 'Message',
            :description => message,
            :url => Config.room_uri)
end