Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 6395d3f7eb
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (15 sloc) 0.495 kb
require 'lib/waveapi/init'
class Robot < AbstractRobot
set_name "Sinatra Bot"
add_cron :clock, 20
def DOCUMENT_CHANGED(properties, context)
wavelet = context.GetWavelets[0]
blip = context.GetBlipById(wavelet.GetRootBlipId())
blip.GetDocument.SetText('Only I get to edit the top blip!')
end
def clock(event, context)
wavelet = context.GetWavelets[0]
blip = context.GetBlipById(wavelet.GetRootBlipId())
blip.GetDocument.SetText("It's " + Time.now.to_s)
end
end
Jump to Line
Something went wrong with that request. Please try again.