File tree 4 files changed +17
-42
lines changed
4 files changed +17
-42
lines changed Original file line number Diff line number Diff line change 5
5
6
6
* Unit tests pass.
7
7
8
- * samples and robot.rb not yet ported from Python to Ruby.
9
-
10
8
* Instructions for use with Sinatra + JRuby + AppEngine:
11
9
http://blog.inigral.com/2009/06/07/a-google-wave-robot-container-in-sinatra/
12
10
Original file line number Diff line number Diff line change
1
+ require 'lib/waveapi/init'
2
+
3
+ class Robot < AbstractRobot
4
+ set_name "Sinatra Bot"
5
+ add_cron :clock, 20
6
+
7
+ def DOCUMENT_CHANGED(properties, context)
8
+ wavelet = context.GetWavelets[0]
9
+ blip = context.GetBlipById(wavelet.GetRootBlipId())
10
+ blip.GetDocument.SetText('Only I get to edit the top blip!')
11
+ end
12
+ def clock(event, context)
13
+ wavelet = context.GetWavelets[0]
14
+ blip = context.GetBlipById(wavelet.GetRootBlipId())
15
+ blip.GetDocument.SetText("It's " + Time.now.to_s)
16
+ end
17
+ end
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments