class Sinoma
Public Class Methods
new( event_source, api_key )
click to toggle source
# File lib/sinoma.rb, line 6 def initialize( event_source, api_key ) @event_source = event_source @api_key = api_key end
Public Instance Methods
start()
click to toggle source
# File lib/sinoma.rb, line 11 def start loop do while ( line = @event_source.gets ) do send_notification line end end end
Private Instance Methods
send_notification( message )
click to toggle source
# File lib/sinoma.rb, line 20 def send_notification( message ) NMA.notify do | notification | notification.description = message notification.apikey = @api_key end end