safubot 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -309,13 +309,13 @@ An appropriate ::Twitter or ::TweetStream object.
309
309
  <pre class="lines">
310
310
 
311
311
 
312
- 129
313
- 130
314
- 131
315
- 132</pre>
312
+ 132
313
+ 133
314
+ 134
315
+ 135</pre>
316
316
  </td>
317
317
  <td>
318
- <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 129</span>
318
+ <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 132</span>
319
319
 
320
320
  <span class='kw'>def</span> <span class='id from'>from</span><span class='lparen'>(</span><span class='id message'>message</span><span class='rparen'>)</span>
321
321
  <span class='const'>DirectMessage</span><span class='period'>.</span><span class='id where'>where</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>raw.id</span><span class='tstring_end'>'</span></span> <span class='op'>=&gt;</span> <span class='id message'>message</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>id</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='op'>||</span><span class='id message'>message</span><span class='period'>.</span><span class='id id'>id</span><span class='rparen'>)</span><span class='period'>.</span><span class='id first'>first</span> <span class='op'>||</span>
@@ -357,12 +357,12 @@ Finds or creates a Request sourced from this DirectMessage.
357
357
  <pre class="lines">
358
358
 
359
359
 
360
- 151
361
- 152
362
- 153</pre>
360
+ 154
361
+ 155
362
+ 156</pre>
363
363
  </td>
364
364
  <td>
365
- <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 151</span>
365
+ <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 154</span>
366
366
 
367
367
  <span class='kw'>def</span> <span class='id make_request'>make_request</span>
368
368
  <span class='kw'>self</span><span class='period'>.</span><span class='id request'>request</span> <span class='op'>||</span> <span class='const'>Request</span><span class='period'>.</span><span class='id create'>create</span><span class='lparen'>(</span><span class='symbol'>:user</span> <span class='op'>=&gt;</span> <span class='id user'>user</span><span class='comma'>,</span> <span class='symbol'>:source</span> <span class='op'>=&gt;</span> <span class='kw'>self</span><span class='comma'>,</span> <span class='symbol'>:text</span> <span class='op'>=&gt;</span> <span class='kw'>self</span><span class='period'>.</span><span class='id text'>text</span><span class='rparen'>)</span>
@@ -397,12 +397,12 @@ The plain text.
397
397
  <pre class="lines">
398
398
 
399
399
 
400
- 136
401
- 137
402
- 138</pre>
400
+ 139
401
+ 140
402
+ 141</pre>
403
403
  </td>
404
404
  <td>
405
- <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 136</span>
405
+ <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 139</span>
406
406
 
407
407
  <span class='kw'>def</span> <span class='id text'>text</span>
408
408
  <span class='kw'>self</span><span class='period'>.</span><span class='id raw'>raw</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>text</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
@@ -437,12 +437,12 @@ Finds or creates a KnownUser connected to this DirectMessage.
437
437
  <pre class="lines">
438
438
 
439
439
 
440
- 146
441
- 147
442
- 148</pre>
440
+ 149
441
+ 150
442
+ 151</pre>
443
443
  </td>
444
444
  <td>
445
- <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 146</span>
445
+ <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 149</span>
446
446
 
447
447
  <span class='kw'>def</span> <span class='id user'>user</span>
448
448
  <span class='const'>KnownUser</span><span class='period'>.</span><span class='id by_twitter'>by_twitter</span><span class='lparen'>(</span><span class='id username'>username</span><span class='rparen'>)</span>
@@ -477,12 +477,12 @@ Finds the user&#8217;s screen_name.
477
477
  <pre class="lines">
478
478
 
479
479
 
480
- 141
481
- 142
482
- 143</pre>
480
+ 144
481
+ 145
482
+ 146</pre>
483
483
  </td>
484
484
  <td>
485
- <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 141</span>
485
+ <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 144</span>
486
486
 
487
487
  <span class='kw'>def</span> <span class='id username'>username</span>
488
488
  <span class='kw'>self</span><span class='period'>.</span><span class='id raw'>raw</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>sender</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>screen_name</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
@@ -497,7 +497,7 @@ Finds the user&#8217;s screen_name.
497
497
  </div>
498
498
 
499
499
  <div id="footer">
500
- Generated on Tue Nov 29 11:44:04 2011 by
500
+ Generated on Thu Dec 1 18:19:17 2011 by
501
501
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
502
502
  0.7.3 (ruby-1.9.2).
503
503
  </div>
@@ -429,12 +429,12 @@ The Twitter id.
429
429
  <pre class="lines">
430
430
 
431
431
 
432
- 60
433
432
  61
434
- 62</pre>
433
+ 62
434
+ 63</pre>
435
435
  </td>
436
436
  <td>
437
- <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 60</span>
437
+ <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 61</span>
438
438
 
439
439
  <span class='kw'>def</span> <span class='op'>[]</span><span class='lparen'>(</span><span class='id id'>id</span><span class='rparen'>)</span>
440
440
  <span class='const'>Tweet</span><span class='period'>.</span><span class='id where'>where</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>raw.id</span><span class='tstring_end'>'</span></span> <span class='op'>=&gt;</span> <span class='id id'>id</span><span class='rparen'>)</span><span class='period'>.</span><span class='id first'>first</span>
@@ -490,13 +490,13 @@ An appropriate ::Twitter or ::TweetStream object.
490
490
  <pre class="lines">
491
491
 
492
492
 
493
- 66
494
- 67
495
493
  68
496
- 69</pre>
494
+ 69
495
+ 70
496
+ 71</pre>
497
497
  </td>
498
498
  <td>
499
- <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 66</span>
499
+ <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 68</span>
500
500
 
501
501
  <span class='kw'>def</span> <span class='id from'>from</span><span class='lparen'>(</span><span class='id status'>status</span><span class='rparen'>)</span>
502
502
  <span class='const'>Tweet</span><span class='period'>.</span><span class='id where'>where</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>raw.id</span><span class='tstring_end'>'</span></span> <span class='op'>=&gt;</span> <span class='id status'>status</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>id</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='op'>||</span><span class='id status'>status</span><span class='period'>.</span><span class='id id'>id</span><span class='rparen'>)</span><span class='period'>.</span><span class='id first'>first</span> <span class='op'>||</span>
@@ -538,13 +538,13 @@ Retrieve a substring containing the leading mentions.
538
538
  <pre class="lines">
539
539
 
540
540
 
541
- 83
542
- 84
543
541
  85
544
- 86</pre>
542
+ 86
543
+ 87
544
+ 88</pre>
545
545
  </td>
546
546
  <td>
547
- <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 83</span>
547
+ <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 85</span>
548
548
 
549
549
  <span class='kw'>def</span> <span class='id header_mentions'>header_mentions</span>
550
550
  <span class='id m'>m</span> <span class='op'>=</span> <span class='id text'>text</span><span class='period'>.</span><span class='id match'>match</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>(@\w+ )+</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span>
@@ -580,12 +580,12 @@ Finds or creates a Request sourced from this Tweet.
580
580
  <pre class="lines">
581
581
 
582
582
 
583
- 109
584
- 110
585
- 111</pre>
583
+ 111
584
+ 112
585
+ 113</pre>
586
586
  </td>
587
587
  <td>
588
- <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 109</span>
588
+ <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 111</span>
589
589
 
590
590
  <span class='kw'>def</span> <span class='id make_request'>make_request</span>
591
591
  <span class='kw'>self</span><span class='period'>.</span><span class='id request'>request</span> <span class='op'>||</span> <span class='const'>Request</span><span class='period'>.</span><span class='id create'>create</span><span class='lparen'>(</span><span class='symbol'>:user</span> <span class='op'>=&gt;</span> <span class='id user'>user</span><span class='comma'>,</span> <span class='symbol'>:source</span> <span class='op'>=&gt;</span> <span class='kw'>self</span><span class='comma'>,</span> <span class='symbol'>:text</span> <span class='op'>=&gt;</span> <span class='kw'>self</span><span class='period'>.</span><span class='id targetless_text'>targetless_text</span><span class='rparen'>)</span>
@@ -620,12 +620,12 @@ Returns the original tweet of which this is a RT if available.
620
620
  <pre class="lines">
621
621
 
622
622
 
623
- 89
624
- 90
625
- 91</pre>
623
+ 91
624
+ 92
625
+ 93</pre>
626
626
  </td>
627
627
  <td>
628
- <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 89</span>
628
+ <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 91</span>
629
629
 
630
630
  <span class='kw'>def</span> <span class='id original_tweet'>original_tweet</span>
631
631
  <span class='kw'>self</span><span class='period'>.</span><span class='id raw'>raw</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>retweeted_status</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>&amp;&amp;</span> <span class='const'>Tweet</span><span class='period'>.</span><span class='id from'>from</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id raw'>raw</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>retweeted_status</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
@@ -660,12 +660,12 @@ Returns a Time object specifying the time of publication.
660
660
  <pre class="lines">
661
661
 
662
662
 
663
- 104
664
- 105
665
- 106</pre>
663
+ 106
664
+ 107
665
+ 108</pre>
666
666
  </td>
667
667
  <td>
668
- <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 104</span>
668
+ <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 106</span>
669
669
 
670
670
  <span class='kw'>def</span> <span class='id posted_at'>posted_at</span>
671
671
  <span class='const'>Time</span><span class='period'>.</span><span class='id parse'>parse</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id raw'>raw</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>created_at</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
@@ -700,12 +700,12 @@ Plain text without the leading mentions.
700
700
  <pre class="lines">
701
701
 
702
702
 
703
- 78
704
- 79
705
- 80</pre>
703
+ 80
704
+ 81
705
+ 82</pre>
706
706
  </td>
707
707
  <td>
708
- <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 78</span>
708
+ <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 80</span>
709
709
 
710
710
  <span class='kw'>def</span> <span class='id targetless_text'>targetless_text</span>
711
711
  <span class='id text'>text</span><span class='period'>.</span><span class='id gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^(@\w+ )+</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
@@ -740,12 +740,12 @@ The plain text.
740
740
  <pre class="lines">
741
741
 
742
742
 
743
- 73
744
- 74
745
- 75</pre>
743
+ 75
744
+ 76
745
+ 77</pre>
746
746
  </td>
747
747
  <td>
748
- <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 73</span>
748
+ <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 75</span>
749
749
 
750
750
  <span class='kw'>def</span> <span class='id text'>text</span>
751
751
  <span class='kw'>self</span><span class='period'>.</span><span class='id raw'>raw</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>text</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
@@ -780,12 +780,12 @@ Finds or creates a KnownUser connected to this Tweet.
780
780
  <pre class="lines">
781
781
 
782
782
 
783
- 94
784
- 95
785
- 96</pre>
783
+ 96
784
+ 97
785
+ 98</pre>
786
786
  </td>
787
787
  <td>
788
- <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 94</span>
788
+ <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 96</span>
789
789
 
790
790
  <span class='kw'>def</span> <span class='id user'>user</span>
791
791
  <span class='const'>KnownUser</span><span class='period'>.</span><span class='id by_twitter'>by_twitter</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id raw'>raw</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>user</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>id</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
@@ -820,12 +820,12 @@ Finds the user&#8217;s screen_name.
820
820
  <pre class="lines">
821
821
 
822
822
 
823
- 99
824
- 100
825
- 101</pre>
823
+ 101
824
+ 102
825
+ 103</pre>
826
826
  </td>
827
827
  <td>
828
- <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 99</span>
828
+ <pre class="code"><span class="info file"># File 'lib/safubot/twitter.rb', line 101</span>
829
829
 
830
830
  <span class='kw'>def</span> <span class='id username'>username</span>
831
831
  <span class='id user'>user</span><span class='period'>.</span><span class='id twitter'>twitter</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>screen_name</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
@@ -840,7 +840,7 @@ Finds the user&#8217;s screen_name.
840
840
  </div>
841
841
 
842
842
  <div id="footer">
843
- Generated on Tue Nov 29 11:44:04 2011 by
843
+ Generated on Thu Dec 1 18:19:17 2011 by
844
844
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
845
845
  0.7.3 (ruby-1.9.2).
846
846
  </div>
@@ -109,7 +109,7 @@ XMPP-specific functionality.
109
109
  </div>
110
110
 
111
111
  <div id="footer">
112
- Generated on Tue Nov 29 11:44:04 2011 by
112
+ Generated on Thu Dec 1 18:19:17 2011 by
113
113
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
114
114
  0.7.3 (ruby-1.9.2).
115
115
  </div>
@@ -437,14 +437,14 @@ A new instance of Bot
437
437
  <pre class="lines">
438
438
 
439
439
 
440
- 159
441
- 160
442
- 161
443
- 162
444
- 163</pre>
440
+ 167
441
+ 168
442
+ 169
443
+ 170
444
+ 171</pre>
445
445
  </td>
446
446
  <td>
447
- <pre class="code"><span class="info file"># File 'lib/safubot/xmpp.rb', line 159</span>
447
+ <pre class="code"><span class="info file"># File 'lib/safubot/xmpp.rb', line 167</span>
448
448
 
449
449
  <span class='kw'>def</span> <span class='id initialize'>initialize</span><span class='lparen'>(</span><span class='id opts'>opts</span><span class='rparen'>)</span>
450
450
  <span class='ivar'>@jid</span> <span class='op'>=</span> <span class='id opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:jid</span><span class='rbracket'>]</span>
@@ -767,16 +767,16 @@ Starts our Blather client running in a new process.
767
767
  <pre class="lines">
768
768
 
769
769
 
770
- 129
771
- 130
772
770
  131
773
771
  132
774
772
  133
775
773
  134
776
- 135</pre>
774
+ 135
775
+ 136
776
+ 137</pre>
777
777
  </td>
778
778
  <td>
779
- <pre class="code"><span class="info file"># File 'lib/safubot/xmpp.rb', line 129</span>
779
+ <pre class="code"><span class="info file"># File 'lib/safubot/xmpp.rb', line 131</span>
780
780
 
781
781
  <span class='kw'>def</span> <span class='id run'>run</span>
782
782
  <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>
@@ -827,22 +827,26 @@ Runs the Blather client.
827
827
  123
828
828
  124
829
829
  125
830
- 126</pre>
830
+ 126
831
+ 127
832
+ 128</pre>
831
833
  </td>
832
834
  <td>
833
835
  <pre class="code"><span class="info file"># File 'lib/safubot/xmpp.rb', line 114</span>
834
836
 
835
837
  <span class='kw'>def</span> <span class='id run_blather'>run_blather</span>
836
838
  <span class='kw'>begin</span>
837
- <span class='const'>EM</span><span class='op'>::</span><span class='id run'>run</span> <span class='lbrace'>{</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id run'>run</span> <span class='rbrace'>}</span>
839
+ <span class='const'>EM</span><span class='op'>::</span><span class='id run'>run</span> <span class='lbrace'>{</span>
840
+ <span class='ivar'>@client</span><span class='period'>.</span><span class='id run'>run</span>
841
+ <span class='rbrace'>}</span>
838
842
  <span class='kw'>rescue</span> <span class='const'>Exception</span> <span class='op'>=&gt;</span> <span class='id e'>e</span>
839
- <span class='kw'>unless</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>
843
+ <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>
844
+ <span class='id stop'>stop</span>
845
+ <span class='kw'>elsif</span> <span class='ivar'>@state</span> <span class='op'>==</span> <span class='symbol'>:running</span>
840
846
  <span class='const'>Log</span><span class='period'>.</span><span class='id error'>error</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>XMPP 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'>&quot;</span></span>
841
847
  <span class='const'>Log</span><span class='period'>.</span><span class='id error'>error</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Restarting XMPP client in 5 seconds.</span><span class='tstring_end'>&quot;</span></span>
842
848
  <span class='id sleep'>sleep</span> <span class='int'>5</span><span class='semicolon'>;</span> <span class='id init_blather'>init_blather</span><span class='semicolon'>;</span> <span class='id run_blather'>run_blather</span>
843
849
  <span class='kw'>end</span>
844
- <span class='kw'>else</span>
845
- <span class='const'>Log</span><span class='period'>.</span><span class='id info'>info</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>XMPP client shutdown complete.</span><span class='tstring_end'>&quot;</span></span>
846
850
  <span class='kw'>end</span>
847
851
  <span class='kw'>end</span></pre>
848
852
  </td>
@@ -875,15 +879,23 @@ Dispatch a Response via XMPP.
875
879
  <pre class="lines">
876
880
 
877
881
 
878
- 155
879
- 156
880
- 157</pre>
882
+ 159
883
+ 160
884
+ 161
885
+ 162
886
+ 163
887
+ 164
888
+ 165</pre>
881
889
  </td>
882
890
  <td>
883
- <pre class="code"><span class="info file"># File 'lib/safubot/xmpp.rb', line 155</span>
891
+ <pre class="code"><span class="info file"># File 'lib/safubot/xmpp.rb', line 159</span>
884
892
 
885
893
  <span class='kw'>def</span> <span class='id send'>send</span><span class='lparen'>(</span><span class='id resp'>resp</span><span class='rparen'>)</span>
886
- <span class='id tell'>tell</span><span class='lparen'>(</span><span class='id resp'>resp</span><span class='period'>.</span><span class='id request'>request</span><span class='period'>.</span><span class='id source'>source</span><span class='period'>.</span><span class='id from'>from</span><span class='comma'>,</span> <span class='id resp'>resp</span><span class='period'>.</span><span class='id text'>text</span><span class='rparen'>)</span>
894
+ <span class='kw'>if</span> <span class='ivar'>@state</span> <span class='op'>==</span> <span class='symbol'>:running</span>
895
+ <span class='id tell'>tell</span><span class='lparen'>(</span><span class='id resp'>resp</span><span class='period'>.</span><span class='id request'>request</span><span class='period'>.</span><span class='id source'>source</span><span class='period'>.</span><span class='id from'>from</span><span class='comma'>,</span> <span class='id resp'>resp</span><span class='period'>.</span><span class='id text'>text</span><span class='rparen'>)</span>
896
+ <span class='kw'>else</span>
897
+ <span class='id on'>on</span><span class='lparen'>(</span><span class='symbol'>:ready</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id send'>send</span><span class='lparen'>(</span><span class='id resp'>resp</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
898
+ <span class='kw'>end</span>
887
899
  <span class='kw'>end</span></pre>
888
900
  </td>
889
901
  </tr>
@@ -915,22 +927,26 @@ Shuts down the Blather client.
915
927
  <pre class="lines">
916
928
 
917
929
 
918
- 138
919
- 139
920
930
  140
921
931
  141
922
932
  142
923
933
  143
924
934
  144
925
- 145</pre>
935
+ 145
936
+ 146
937
+ 147
938
+ 148
939
+ 149</pre>
926
940
  </td>
927
941
  <td>
928
- <pre class="code"><span class="info file"># File 'lib/safubot/xmpp.rb', line 138</span>
942
+ <pre class="code"><span class="info file"># File 'lib/safubot/xmpp.rb', line 140</span>
929
943
 
930
944
  <span class='kw'>def</span> <span class='id stop'>stop</span>
931
945
  <span class='kw'>if</span> <span class='ivar'>@client</span>
932
946
  <span class='ivar'>@state</span> <span class='op'>=</span> <span class='symbol'>:stopped</span>
933
947
  <span class='ivar'>@client</span><span class='period'>.</span><span class='id close'>close</span>
948
+ <span class='ivar'>@client</span> <span class='op'>=</span> <span class='kw'>nil</span>
949
+ <span class='const'>Log</span><span class='period'>.</span><span class='id info'>info</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>XMPP client shutdown complete.</span><span class='tstring_end'>&quot;</span></span>
934
950
  <span class='kw'>elsif</span> <span class='ivar'>@pid</span>
935
951
  <span class='const'>Process</span><span class='period'>.</span><span class='id kill'>kill</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>TERM</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='ivar'>@pid</span><span class='rparen'>)</span>
936
952
  <span class='kw'>end</span>
@@ -953,15 +969,15 @@ Shuts down the Blather client.
953
969
  <pre class="lines">
954
970
 
955
971
 
956
- 147
957
- 148
958
- 149
959
- 150
960
972
  151
961
- 152</pre>
973
+ 152
974
+ 153
975
+ 154
976
+ 155
977
+ 156</pre>
962
978
  </td>
963
979
  <td>
964
- <pre class="code"><span class="info file"># File 'lib/safubot/xmpp.rb', line 147</span>
980
+ <pre class="code"><span class="info file"># File 'lib/safubot/xmpp.rb', line 151</span>
965
981
 
966
982
  <span class='kw'>def</span> <span class='id tell'>tell</span><span class='lparen'>(</span><span class='id jid'>jid</span><span class='comma'>,</span> <span class='id text'>text</span><span class='rparen'>)</span>
967
983
  <span class='id msg'>msg</span> <span class='op'>=</span> <span class='const'>Blather</span><span class='op'>::</span><span class='const'>Stanza</span><span class='op'>::</span><span class='const'>Message</span><span class='period'>.</span><span class='id new'>new</span>
@@ -979,7 +995,7 @@ Shuts down the Blather client.
979
995
  </div>
980
996
 
981
997
  <div id="footer">
982
- Generated on Tue Nov 29 11:44:04 2011 by
998
+ Generated on Thu Dec 1 18:19:17 2011 by
983
999
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
984
1000
  0.7.3 (ruby-1.9.2).
985
1001
  </div>
@@ -444,7 +444,7 @@ Retrieves the sender&#8217;s username from the JID.
444
444
  </div>
445
445
 
446
446
  <div id="footer">
447
- Generated on Tue Nov 29 11:44:04 2011 by
447
+ Generated on Thu Dec 1 18:19:17 2011 by
448
448
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
449
449
  0.7.3 (ruby-1.9.2).
450
450
  </div>
@@ -109,7 +109,7 @@ XMPP-specific functionality.
109
109
  </div>
110
110
 
111
111
  <div id="footer">
112
- Generated on Tue Nov 29 11:44:04 2011 by
112
+ Generated on Thu Dec 1 18:19:17 2011 by
113
113
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
114
114
  0.7.3 (ruby-1.9.2).
115
115
  </div>
data/doc/Safubot.html CHANGED
@@ -83,11 +83,11 @@
83
83
  <p class="children">
84
84
 
85
85
 
86
- <strong class="modules">Modules:</strong> <span class='object_link'><a href="Safubot/Evented.html" title="Safubot::Evented (module)">Evented</a></span>, <span class='object_link'><a href="Safubot/Log.html" title="Safubot::Log (module)">Log</a></span>, <span class='object_link'><a href="Safubot/Test.html" title="Safubot::Test (module)">Test</a></span>, <span class='object_link'><a href="Safubot/Twitter.html" title="Safubot::Twitter (module)">Twitter</a></span>, <span class='object_link'><a href="Safubot/XMPP.html" title="Safubot::XMPP (module)">XMPP</a></span>
86
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Safubot/Evented.html" title="Safubot::Evented (module)">Evented</a></span>, <span class='object_link'><a href="Safubot/Log.html" title="Safubot::Log (module)">Log</a></span>, <span class='object_link'><a href="Safubot/Problematic.html" title="Safubot::Problematic (module)">Problematic</a></span>, <span class='object_link'><a href="Safubot/Test.html" title="Safubot::Test (module)">Test</a></span>, <span class='object_link'><a href="Safubot/Twitter.html" title="Safubot::Twitter (module)">Twitter</a></span>, <span class='object_link'><a href="Safubot/XMPP.html" title="Safubot::XMPP (module)">XMPP</a></span>
87
87
 
88
88
 
89
89
 
90
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="Safubot/Bot.html" title="Safubot::Bot (class)">Bot</a></span>, <span class='object_link'><a href="Safubot/KnownUser.html" title="Safubot::KnownUser (class)">KnownUser</a></span>, <span class='object_link'><a href="Safubot/Query.html" title="Safubot::Query (class)">Query</a></span>, <span class='object_link'><a href="Safubot/Request.html" title="Safubot::Request (class)">Request</a></span>, <span class='object_link'><a href="Safubot/Response.html" title="Safubot::Response (class)">Response</a></span>
90
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Safubot/Bot.html" title="Safubot::Bot (class)">Bot</a></span>, <span class='object_link'><a href="Safubot/KnownUser.html" title="Safubot::KnownUser (class)">KnownUser</a></span>, <span class='object_link'><a href="Safubot/Problem.html" title="Safubot::Problem (class)">Problem</a></span>, <span class='object_link'><a href="Safubot/Query.html" title="Safubot::Query (class)">Query</a></span>, <span class='object_link'><a href="Safubot/Request.html" title="Safubot::Request (class)">Request</a></span>, <span class='object_link'><a href="Safubot/Response.html" title="Safubot::Response (class)">Response</a></span>
91
91
 
92
92
 
93
93
  </p>
@@ -99,7 +99,7 @@
99
99
  <dt id="VERSION-constant" class="">VERSION =
100
100
 
101
101
  </dt>
102
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.0.2</span><span class='tstring_end'>&quot;</span></span></pre></dd>
102
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.0.4</span><span class='tstring_end'>&quot;</span></span></pre></dd>
103
103
 
104
104
  </dl>
105
105
 
@@ -295,7 +295,7 @@ An Exception to print.
295
295
  </div>
296
296
 
297
297
  <div id="footer">
298
- Generated on Tue Nov 29 11:44:04 2011 by
298
+ Generated on Thu Dec 1 18:19:17 2011 by
299
299
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
300
300
  0.7.3 (ruby-1.9.2).
301
301
  </div>
data/doc/_index.html CHANGED
@@ -180,12 +180,19 @@
180
180
  </ul>
181
181
 
182
182
 
183
- <ul id="alpha_Q" class="alpha">
184
- <li class="letter">Q</li>
183
+ <ul id="alpha_P" class="alpha">
184
+ <li class="letter">P</li>
185
185
  <ul>
186
186
 
187
187
  <li>
188
- <span class='object_link'><a href="Safubot/Query.html" title="Safubot::Query (class)">Query</a></span>
188
+ <span class='object_link'><a href="Safubot/Problem.html" title="Safubot::Problem (class)">Problem</a></span>
189
+
190
+ <small>(Safubot)</small>
191
+
192
+ </li>
193
+
194
+ <li>
195
+ <span class='object_link'><a href="Safubot/Problematic.html" title="Safubot::Problematic (module)">Problematic</a></span>
189
196
 
190
197
  <small>(Safubot)</small>
191
198
 
@@ -198,6 +205,21 @@
198
205
  </td><td valign='top' width="33%">
199
206
 
200
207
 
208
+ <ul id="alpha_Q" class="alpha">
209
+ <li class="letter">Q</li>
210
+ <ul>
211
+
212
+ <li>
213
+ <span class='object_link'><a href="Safubot/Query.html" title="Safubot::Query (class)">Query</a></span>
214
+
215
+ <small>(Safubot)</small>
216
+
217
+ </li>
218
+
219
+ </ul>
220
+ </ul>
221
+
222
+
201
223
  <ul id="alpha_R" class="alpha">
202
224
  <li class="letter">R</li>
203
225
  <ul>
@@ -285,7 +307,7 @@
285
307
  </div>
286
308
 
287
309
  <div id="footer">
288
- Generated on Tue Nov 29 11:44:04 2011 by
310
+ Generated on Thu Dec 1 18:19:17 2011 by
289
311
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
290
312
  0.7.3 (ruby-1.9.2).
291
313
  </div>
data/doc/class_list.html CHANGED
@@ -39,7 +39,7 @@
39
39
 
40
40
  <ul id="full_list" class="class">
41
41
  <li><span class='object_link'><a href="top-level-namespace.html" title=" (root)">Top Level Namespace</a></span></li>
42
- <li><a class='toggle'></a> <span class='object_link'><a href="Safubot.html" title="Safubot (module)">Safubot</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><span class='object_link'><a href="Safubot/Bot.html" title="Safubot::Bot (class)">Bot</a></span> &lt; Object<small class='search_info'>Safubot</small></li><li><span class='object_link'><a href="Safubot/Evented.html" title="Safubot::Evented (module)">Evented</a></span><small class='search_info'>Safubot</small></li><li><span class='object_link'><a href="Safubot/KnownUser.html" title="Safubot::KnownUser (class)">KnownUser</a></span> &lt; Object<small class='search_info'>Safubot</small></li><li><span class='object_link'><a href="Safubot/Log.html" title="Safubot::Log (module)">Log</a></span><small class='search_info'>Safubot</small></li><li><span class='object_link'><a href="Safubot/Query.html" title="Safubot::Query (class)">Query</a></span> &lt; Object<small class='search_info'>Safubot</small></li><li><span class='object_link'><a href="Safubot/Request.html" title="Safubot::Request (class)">Request</a></span> &lt; Object<small class='search_info'>Safubot</small></li><li><span class='object_link'><a href="Safubot/Response.html" title="Safubot::Response (class)">Response</a></span> &lt; Object<small class='search_info'>Safubot</small></li><li><span class='object_link'><a href="Safubot/Test.html" title="Safubot::Test (module)">Test</a></span><small class='search_info'>Safubot</small></li><li><a class='toggle'></a> <span class='object_link'><a href="Safubot/Twitter.html" title="Safubot::Twitter (module)">Twitter</a></span><small class='search_info'>Safubot</small></li><ul><li><span class='object_link'><a href="Safubot/Twitter/Bot.html" title="Safubot::Twitter::Bot (class)">Bot</a></span> &lt; Object<small class='search_info'>Safubot::Twitter</small></li><li><span class='object_link'><a href="Safubot/Twitter/DirectMessage.html" title="Safubot::Twitter::DirectMessage (class)">DirectMessage</a></span> &lt; Object<small class='search_info'>Safubot::Twitter</small></li><li><span class='object_link'><a href="Safubot/Twitter/Tweet.html" title="Safubot::Twitter::Tweet (class)">Tweet</a></span> &lt; Object<small class='search_info'>Safubot::Twitter</small></li></ul><li><a class='toggle'></a> <span class='object_link'><a href="Safubot/XMPP.html" title="Safubot::XMPP (module)">XMPP</a></span><small class='search_info'>Safubot</small></li><ul><li><span class='object_link'><a href="Safubot/XMPP/Bot.html" title="Safubot::XMPP::Bot (class)">Bot</a></span> &lt; Object<small class='search_info'>Safubot::XMPP</small></li><li><span class='object_link'><a href="Safubot/XMPP/Message.html" title="Safubot::XMPP::Message (class)">Message</a></span> &lt; Object<small class='search_info'>Safubot::XMPP</small></li></ul></ul>
42
+ <li><a class='toggle'></a> <span class='object_link'><a href="Safubot.html" title="Safubot (module)">Safubot</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><span class='object_link'><a href="Safubot/Bot.html" title="Safubot::Bot (class)">Bot</a></span> &lt; Object<small class='search_info'>Safubot</small></li><li><span class='object_link'><a href="Safubot/Evented.html" title="Safubot::Evented (module)">Evented</a></span><small class='search_info'>Safubot</small></li><li><span class='object_link'><a href="Safubot/KnownUser.html" title="Safubot::KnownUser (class)">KnownUser</a></span> &lt; Object<small class='search_info'>Safubot</small></li><li><span class='object_link'><a href="Safubot/Log.html" title="Safubot::Log (module)">Log</a></span><small class='search_info'>Safubot</small></li><li><span class='object_link'><a href="Safubot/Problem.html" title="Safubot::Problem (class)">Problem</a></span> &lt; Object<small class='search_info'>Safubot</small></li><li><span class='object_link'><a href="Safubot/Problematic.html" title="Safubot::Problematic (module)">Problematic</a></span><small class='search_info'>Safubot</small></li><li><span class='object_link'><a href="Safubot/Query.html" title="Safubot::Query (class)">Query</a></span> &lt; Object<small class='search_info'>Safubot</small></li><li><span class='object_link'><a href="Safubot/Request.html" title="Safubot::Request (class)">Request</a></span> &lt; Object<small class='search_info'>Safubot</small></li><li><span class='object_link'><a href="Safubot/Response.html" title="Safubot::Response (class)">Response</a></span> &lt; Object<small class='search_info'>Safubot</small></li><li><span class='object_link'><a href="Safubot/Test.html" title="Safubot::Test (module)">Test</a></span><small class='search_info'>Safubot</small></li><li><a class='toggle'></a> <span class='object_link'><a href="Safubot/Twitter.html" title="Safubot::Twitter (module)">Twitter</a></span><small class='search_info'>Safubot</small></li><ul><li><span class='object_link'><a href="Safubot/Twitter/Bot.html" title="Safubot::Twitter::Bot (class)">Bot</a></span> &lt; Object<small class='search_info'>Safubot::Twitter</small></li><li><span class='object_link'><a href="Safubot/Twitter/DirectMessage.html" title="Safubot::Twitter::DirectMessage (class)">DirectMessage</a></span> &lt; Object<small class='search_info'>Safubot::Twitter</small></li><li><span class='object_link'><a href="Safubot/Twitter/Tweet.html" title="Safubot::Twitter::Tweet (class)">Tweet</a></span> &lt; Object<small class='search_info'>Safubot::Twitter</small></li></ul><li><a class='toggle'></a> <span class='object_link'><a href="Safubot/XMPP.html" title="Safubot::XMPP (module)">XMPP</a></span><small class='search_info'>Safubot</small></li><ul><li><span class='object_link'><a href="Safubot/XMPP/Bot.html" title="Safubot::XMPP::Bot (class)">Bot</a></span> &lt; Object<small class='search_info'>Safubot::XMPP</small></li><li><span class='object_link'><a href="Safubot/XMPP/Message.html" title="Safubot::XMPP::Message (class)">Message</a></span> &lt; Object<small class='search_info'>Safubot::XMPP</small></li></ul></ul>
43
43
 
44
44
  </ul>
45
45
  </div>