doc/Safubot/Twitter/Bot.html in safubot-0.0.5 vs doc/Safubot/Twitter/Bot.html in safubot-0.0.6
- old
+ new
@@ -270,10 +270,34 @@
<ul class="summary">
<li class="public ">
<span class="summary_signature">
+ <a href="#fork-instance_method" title="#fork (instance method)">- (Object) <strong>fork</strong> </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'><p>
+Starts our TweetStream client running in a new process.
+</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
<a href="#handle_message-instance_method" title="#handle_message (instance method)">- (Object) <strong>handle_message</strong>(message) </a>
</span>
@@ -478,11 +502,11 @@
<span class="summary_desc"><div class='inline'><p>
-Starts our TweetStream client running in a new process.
+Starts our TweetStream client running.
</p>
</div></span>
</li>
@@ -621,25 +645,25 @@
<tr>
<td>
<pre class="lines">
-299
-300
-301
-302
-303
304
305
306
307
308
309
-310</pre>
+310
+311
+312
+313
+314
+315</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 299</span>
+ <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 304</span>
<span class='kw'>def</span> <span class='id initialize'>initialize</span><span class='lparen'>(</span><span class='id options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
<span class='id defaults'>defaults</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:username</span> <span class='op'>=></span> <span class='kw'>nil</span><span class='comma'>,</span>
<span class='symbol'>:consumer_key</span> <span class='op'>=></span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='symbol'>:consumer_secret</span> <span class='op'>=></span> <span class='kw'>nil</span><span class='comma'>,</span>
<span class='symbol'>:oauth_token</span> <span class='op'>=></span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='symbol'>:oauth_token_secret</span> <span class='op'>=></span> <span class='kw'>nil</span><span class='comma'>,</span>
@@ -882,12 +906,58 @@
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
- <p class="signature first" id="handle_message-instance_method">
+ <p class="signature first" id="fork-instance_method">
+ - (<tt>Object</tt>) <strong>fork</strong>
+
+
+
+</p><div class="docstring">
+ <div class="discussion">
+ <p>
+Starts our TweetStream client running in a new process.
+</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+283
+284
+285
+286
+287
+288</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 283</span>
+
+<span class='kw'>def</span> <span class='id fork'>fork</span>
+ <span class='ivar'>@pid</span> <span class='op'>=</span> <span class='const'>Process</span><span class='period'>.</span><span class='id fork'>fork</span> <span class='kw'>do</span>
+ <span class='const'>Signal</span><span class='period'>.</span><span class='id trap'>trap</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>TERM</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id stop'>stop</span> <span class='rbrace'>}</span>
+ <span class='id run'>run</span>
+ <span class='kw'>end</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <p class="signature " id="handle_message-instance_method">
+
- (<tt>Object</tt>) <strong>handle_message</strong>(message)
</p><div class="docstring">
@@ -1345,11 +1415,11 @@
</p><div class="docstring">
<div class="discussion">
<p>
-Starts our TweetStream client running in a new process.
+Starts our TweetStream client running.
</p>
</div>
</div>
@@ -1363,24 +1433,18 @@
277
278
279
-280
-281
-282
-283</pre>
+280</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 277</span>
<span class='kw'>def</span> <span class='id run'>run</span>
- <span class='ivar'>@pid</span> <span class='op'>=</span> <span class='const'>Process</span><span class='period'>.</span><span class='id fork'>fork</span> <span class='kw'>do</span>
- <span class='const'>Signal</span><span class='period'>.</span><span class='id trap'>trap</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>TERM</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id stop'>stop</span> <span class='rbrace'>}</span>
- <span class='id init_stream'>init_stream</span>
- <span class='id run_stream'>run_stream</span>
- <span class='kw'>end</span>
+ <span class='id init_stream'>init_stream</span>
+ <span class='id run_stream'>run_stream</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
@@ -1438,11 +1502,11 @@
<span class='kw'>if</span> <span class='id e'>e</span><span class='period'>.</span><span class='id is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Interrupt</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id e'>e</span><span class='period'>.</span><span class='id is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>SignalException</span><span class='rparen'>)</span>
<span class='id stop'>stop</span>
<span class='kw'>else</span>
<span class='const'>Log</span><span class='period'>.</span><span class='id error'>error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>TweetStream client exited unexpectedly: </span><span class='embexpr_beg'>#{</span><span class='id error_report'>error_report</span><span class='lparen'>(</span><span class='id e'>e</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
<span class='const'>Log</span><span class='period'>.</span><span class='id error'>error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Restarting TweetStream client in 5 seconds.</span><span class='tstring_end'>"</span></span>
-<span class='id sleep'>sleep</span> <span class='int'>5</span><span class='semicolon'>;</span> <span class='id init_stream'>init_stream</span><span class='semicolon'>;</span> <span class='id run_stream'>run_stream</span>
+<span class='const'>EM</span><span class='op'>::</span><span class='const'>Timer</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='int'>5</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id init_stream'>init_stream</span><span class='semicolon'>;</span> <span class='id run_stream'>run_stream</span> <span class='rbrace'>}</span>
<span class='kw'>end</span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
@@ -1547,22 +1611,22 @@
<tr>
<td>
<pre class="lines">
-286
-287
-288
-289
-290
291
292
293
-294</pre>
+294
+295
+296
+297
+298
+299</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 286</span>
+ <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 291</span>
<span class='kw'>def</span> <span class='id stop'>stop</span>
<span class='kw'>if</span> <span class='ivar'>@stream</span>
<span class='ivar'>@stream</span><span class='period'>.</span><span class='id stop'>stop</span>
<span class='ivar'>@stream</span> <span class='op'>=</span> <span class='kw'>nil</span>
@@ -1579,10 +1643,10 @@
</div>
</div>
<div id="footer">
- Generated on Thu Dec 1 18:19:17 2011 by
+ Generated on Thu Dec 1 11:12:27 2011 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.3 (ruby-1.9.2).
</div>
</body>
\ No newline at end of file