twitter_alert 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +27 -3
- data/VERSION +1 -1
- data/doc/LICENSE.html +115 -0
- data/doc/README_rdoc.html +173 -0
- data/doc/TwitterAlert.html +157 -0
- data/doc/TwitterAlert/Account.html +310 -0
- data/doc/TwitterAlert/Alert.html +381 -0
- data/doc/created.rid +6 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +76 -0
- data/doc/js/darkfish.js +116 -0
- data/doc/js/jquery.js +32 -0
- data/doc/js/quicksearch.js +114 -0
- data/doc/js/thickbox-compressed.js +10 -0
- data/doc/lib/twitter_alert/account_rb.html +52 -0
- data/doc/lib/twitter_alert/alert_rb.html +52 -0
- data/doc/lib/twitter_alert_rb.html +58 -0
- data/doc/rdoc.css +706 -0
- data/lib/twitter_alert/account.rb +8 -0
- data/lib/twitter_alert/alert.rb +15 -1
- data/twitter_alert.gemspec +96 -0
- metadata +39 -3
@@ -0,0 +1,310 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Class: TwitterAlert::Account</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="../js/jquery.js" type="text/javascript"
|
13
|
+
charset="utf-8"></script>
|
14
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
15
|
+
charset="utf-8"></script>
|
16
|
+
<script src="../js/quicksearch.js" type="text/javascript"
|
17
|
+
charset="utf-8"></script>
|
18
|
+
<script src="../js/darkfish.js" type="text/javascript"
|
19
|
+
charset="utf-8"></script>
|
20
|
+
|
21
|
+
</head>
|
22
|
+
<body class="class">
|
23
|
+
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="home-metadata">
|
26
|
+
<div id="home-section" class="section">
|
27
|
+
<h3 class="section-header">
|
28
|
+
<a href="../index.html">Home</a>
|
29
|
+
<a href="../index.html#classes">Classes</a>
|
30
|
+
<a href="../index.html#methods">Methods</a>
|
31
|
+
</h3>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="file-metadata">
|
36
|
+
<div id="file-list-section" class="section">
|
37
|
+
<h3 class="section-header">In Files</h3>
|
38
|
+
<div class="section-body">
|
39
|
+
<ul>
|
40
|
+
|
41
|
+
<li><a href="../lib/twitter_alert/account_rb.html?TB_iframe=true&height=550&width=785"
|
42
|
+
class="thickbox" title="lib/twitter_alert/account.rb">lib/twitter_alert/account.rb</a></li>
|
43
|
+
|
44
|
+
</ul>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div id="class-metadata">
|
52
|
+
|
53
|
+
<!-- Parent Class -->
|
54
|
+
|
55
|
+
<div id="parent-class-section" class="section">
|
56
|
+
<h3 class="section-header">Parent</h3>
|
57
|
+
|
58
|
+
<p class="link">Object</p>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
|
62
|
+
|
63
|
+
<!-- Namespace Contents -->
|
64
|
+
|
65
|
+
|
66
|
+
<!-- Method Quickref -->
|
67
|
+
|
68
|
+
<div id="method-list-section" class="section">
|
69
|
+
<h3 class="section-header">Methods</h3>
|
70
|
+
<ul class="link-list">
|
71
|
+
|
72
|
+
<li><a href="#method-c-new">::new</a></li>
|
73
|
+
|
74
|
+
<li><a href="#method-i-announce">#announce</a></li>
|
75
|
+
|
76
|
+
<li><a href="#method-i-followers">#followers</a></li>
|
77
|
+
|
78
|
+
</ul>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
|
82
|
+
<!-- Included Modules -->
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
<div id="project-metadata">
|
87
|
+
|
88
|
+
|
89
|
+
<div id="fileindex-section" class="section project-section">
|
90
|
+
<h3 class="section-header">Files</h3>
|
91
|
+
<ul>
|
92
|
+
|
93
|
+
<li class="file"><a href="../LICENSE.html">LICENSE</a></li>
|
94
|
+
|
95
|
+
<li class="file"><a href="../README_rdoc.html">README.rdoc</a></li>
|
96
|
+
|
97
|
+
</ul>
|
98
|
+
</div>
|
99
|
+
|
100
|
+
|
101
|
+
<div id="classindex-section" class="section project-section">
|
102
|
+
<h3 class="section-header">Class Index
|
103
|
+
<span class="search-toggle"><img src="../images/find.png"
|
104
|
+
height="16" width="16" alt="[+]"
|
105
|
+
title="show/hide quicksearch" /></span></h3>
|
106
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
107
|
+
<fieldset>
|
108
|
+
<legend>Quicksearch</legend>
|
109
|
+
<input type="text" name="quicksearch" value=""
|
110
|
+
class="quicksearch-field" />
|
111
|
+
</fieldset>
|
112
|
+
</form>
|
113
|
+
|
114
|
+
<ul class="link-list">
|
115
|
+
|
116
|
+
<li><a href="../TwitterAlert.html">TwitterAlert</a></li>
|
117
|
+
|
118
|
+
<li><a href="../TwitterAlert/Account.html">TwitterAlert::Account</a></li>
|
119
|
+
|
120
|
+
<li><a href="../TwitterAlert/Alert.html">TwitterAlert::Alert</a></li>
|
121
|
+
|
122
|
+
</ul>
|
123
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
124
|
+
</div>
|
125
|
+
|
126
|
+
|
127
|
+
</div>
|
128
|
+
</div>
|
129
|
+
|
130
|
+
<div id="documentation">
|
131
|
+
<h1 class="class">TwitterAlert::Account</h1>
|
132
|
+
|
133
|
+
<div id="description">
|
134
|
+
<p>
|
135
|
+
This represents the Twitter account you’ll use to send DMs from.
|
136
|
+
</p>
|
137
|
+
|
138
|
+
</div>
|
139
|
+
|
140
|
+
<!-- Constants -->
|
141
|
+
|
142
|
+
|
143
|
+
<!-- Attributes -->
|
144
|
+
|
145
|
+
|
146
|
+
<!-- Methods -->
|
147
|
+
|
148
|
+
<div id="public-class-method-details" class="method-section section">
|
149
|
+
<h3 class="section-header">Public Class Methods</h3>
|
150
|
+
|
151
|
+
|
152
|
+
<div id="new-method" class="method-detail ">
|
153
|
+
<a name="method-c-new"></a>
|
154
|
+
|
155
|
+
<div class="method-heading">
|
156
|
+
|
157
|
+
<span class="method-name">new</span><span
|
158
|
+
class="method-args">(config)</span>
|
159
|
+
<span class="method-click-advice">click to toggle source</span>
|
160
|
+
|
161
|
+
</div>
|
162
|
+
|
163
|
+
<div class="method-description">
|
164
|
+
|
165
|
+
<p>
|
166
|
+
Config is a hash that needs :user_name and :password keys.
|
167
|
+
</p>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<div class="method-source-code"
|
172
|
+
id="new-source">
|
173
|
+
<pre>
|
174
|
+
<span class="ruby-comment cmt"># File lib/twitter_alert/account.rb, line 7</span>
|
175
|
+
7: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">config</span>
|
176
|
+
8: <span class="ruby-comment cmt"># Load hash from yaml file in default location?</span>
|
177
|
+
9:
|
178
|
+
10: <span class="ruby-ivar">@username</span> = <span class="ruby-identifier">config</span>[<span class="ruby-value">:user_name</span>]
|
179
|
+
11: <span class="ruby-ivar">@password</span> = <span class="ruby-identifier">config</span>[<span class="ruby-value">:password</span>]
|
180
|
+
12:
|
181
|
+
13: <span class="ruby-ivar">@client</span> = <span class="ruby-constant">Grackle</span><span class="ruby-operator">::</span><span class="ruby-constant">Client</span>.<span class="ruby-identifier">new</span>(
|
182
|
+
14: <span class="ruby-value">:auth</span> =<span class="ruby-operator">></span> {
|
183
|
+
15: <span class="ruby-value">:type</span> =<span class="ruby-operator">></span> <span class="ruby-value">:basic</span>,
|
184
|
+
16: <span class="ruby-value">:username</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@username</span>,
|
185
|
+
17: <span class="ruby-value">:password</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@password</span>
|
186
|
+
18: }
|
187
|
+
19: )
|
188
|
+
20: <span class="ruby-keyword kw">end</span></pre>
|
189
|
+
</div>
|
190
|
+
|
191
|
+
</div>
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
</div>
|
197
|
+
|
198
|
+
|
199
|
+
</div>
|
200
|
+
|
201
|
+
<div id="public-instance-method-details" class="method-section section">
|
202
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
203
|
+
|
204
|
+
|
205
|
+
<div id="announce-method" class="method-detail ">
|
206
|
+
<a name="method-i-announce"></a>
|
207
|
+
|
208
|
+
<div class="method-heading">
|
209
|
+
|
210
|
+
<span class="method-name">announce</span><span
|
211
|
+
class="method-args">(message)</span>
|
212
|
+
<span class="method-click-advice">click to toggle source</span>
|
213
|
+
|
214
|
+
</div>
|
215
|
+
|
216
|
+
<div class="method-description">
|
217
|
+
|
218
|
+
<p>
|
219
|
+
Sends the text of message to all of the account’s followers.
|
220
|
+
Message’s class should include the <a
|
221
|
+
href="Alert.html">TwitterAlert::Alert</a> Module.
|
222
|
+
</p>
|
223
|
+
<p>
|
224
|
+
Returns true if things went well and false if any DMs failed.
|
225
|
+
</p>
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
<div class="method-source-code"
|
230
|
+
id="announce-source">
|
231
|
+
<pre>
|
232
|
+
<span class="ruby-comment cmt"># File lib/twitter_alert/account.rb, line 25</span>
|
233
|
+
25: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">announce</span> <span class="ruby-identifier">message</span>
|
234
|
+
26: <span class="ruby-identifier">followers</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">follower</span><span class="ruby-operator">|</span>
|
235
|
+
27: <span class="ruby-keyword kw">begin</span>
|
236
|
+
28: <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">direct_messages</span>.<span class="ruby-identifier">new!</span> <span class="ruby-value">:user_id</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">follower</span>, <span class="ruby-value">:text</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">message</span>.<span class="ruby-identifier">text</span>
|
237
|
+
29: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Grackle</span><span class="ruby-operator">::</span><span class="ruby-constant">TwitterError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
238
|
+
30: <span class="ruby-identifier">message</span>.<span class="ruby-identifier">add_failed_announcement</span> <span class="ruby-identifier">follower</span>, <span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span>
|
239
|
+
31: <span class="ruby-keyword kw">end</span>
|
240
|
+
32: <span class="ruby-keyword kw">end</span>
|
241
|
+
33:
|
242
|
+
34: <span class="ruby-identifier">message</span>.<span class="ruby-identifier">mark_sent</span>
|
243
|
+
35: <span class="ruby-keyword kw">end</span></pre>
|
244
|
+
</div>
|
245
|
+
|
246
|
+
</div>
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
</div>
|
252
|
+
|
253
|
+
|
254
|
+
<div id="followers-method" class="method-detail ">
|
255
|
+
<a name="method-i-followers"></a>
|
256
|
+
|
257
|
+
<div class="method-heading">
|
258
|
+
|
259
|
+
<span class="method-name">followers</span><span
|
260
|
+
class="method-args">()</span>
|
261
|
+
<span class="method-click-advice">click to toggle source</span>
|
262
|
+
|
263
|
+
</div>
|
264
|
+
|
265
|
+
<div class="method-description">
|
266
|
+
|
267
|
+
<p>
|
268
|
+
Returns an array of ids of all the followers of the account.
|
269
|
+
</p>
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
<div class="method-source-code"
|
274
|
+
id="followers-source">
|
275
|
+
<pre>
|
276
|
+
<span class="ruby-comment cmt"># File lib/twitter_alert/account.rb, line 38</span>
|
277
|
+
38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">followers</span>
|
278
|
+
39: <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">followers</span>.<span class="ruby-identifier">ids?</span>
|
279
|
+
40: <span class="ruby-keyword kw">end</span></pre>
|
280
|
+
</div>
|
281
|
+
|
282
|
+
</div>
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
</div>
|
288
|
+
|
289
|
+
|
290
|
+
</div>
|
291
|
+
|
292
|
+
|
293
|
+
</div>
|
294
|
+
|
295
|
+
|
296
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
297
|
+
|
298
|
+
<p>Disabled; run with --debug to generate this.</p>
|
299
|
+
|
300
|
+
</div>
|
301
|
+
|
302
|
+
<div id="validator-badges">
|
303
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
304
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
305
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
306
|
+
</div>
|
307
|
+
|
308
|
+
</body>
|
309
|
+
</html>
|
310
|
+
|
@@ -0,0 +1,381 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Module: TwitterAlert::Alert</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="../js/jquery.js" type="text/javascript"
|
13
|
+
charset="utf-8"></script>
|
14
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
15
|
+
charset="utf-8"></script>
|
16
|
+
<script src="../js/quicksearch.js" type="text/javascript"
|
17
|
+
charset="utf-8"></script>
|
18
|
+
<script src="../js/darkfish.js" type="text/javascript"
|
19
|
+
charset="utf-8"></script>
|
20
|
+
|
21
|
+
</head>
|
22
|
+
<body class="module">
|
23
|
+
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="home-metadata">
|
26
|
+
<div id="home-section" class="section">
|
27
|
+
<h3 class="section-header">
|
28
|
+
<a href="../index.html">Home</a>
|
29
|
+
<a href="../index.html#classes">Classes</a>
|
30
|
+
<a href="../index.html#methods">Methods</a>
|
31
|
+
</h3>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="file-metadata">
|
36
|
+
<div id="file-list-section" class="section">
|
37
|
+
<h3 class="section-header">In Files</h3>
|
38
|
+
<div class="section-body">
|
39
|
+
<ul>
|
40
|
+
|
41
|
+
<li><a href="../lib/twitter_alert/alert_rb.html?TB_iframe=true&height=550&width=785"
|
42
|
+
class="thickbox" title="lib/twitter_alert/alert.rb">lib/twitter_alert/alert.rb</a></li>
|
43
|
+
|
44
|
+
</ul>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div id="class-metadata">
|
52
|
+
|
53
|
+
<!-- Parent Class -->
|
54
|
+
|
55
|
+
|
56
|
+
<!-- Namespace Contents -->
|
57
|
+
|
58
|
+
|
59
|
+
<!-- Method Quickref -->
|
60
|
+
|
61
|
+
<div id="method-list-section" class="section">
|
62
|
+
<h3 class="section-header">Methods</h3>
|
63
|
+
<ul class="link-list">
|
64
|
+
|
65
|
+
<li><a href="#method-c-new">::new</a></li>
|
66
|
+
|
67
|
+
<li><a href="#method-i-add_failed_announcement">#add_failed_announcement</a></li>
|
68
|
+
|
69
|
+
<li><a href="#method-i-mark_sent">#mark_sent</a></li>
|
70
|
+
|
71
|
+
<li><a href="#method-i-sent%3F">#sent?</a></li>
|
72
|
+
|
73
|
+
</ul>
|
74
|
+
</div>
|
75
|
+
|
76
|
+
|
77
|
+
<!-- Included Modules -->
|
78
|
+
|
79
|
+
</div>
|
80
|
+
|
81
|
+
<div id="project-metadata">
|
82
|
+
|
83
|
+
|
84
|
+
<div id="fileindex-section" class="section project-section">
|
85
|
+
<h3 class="section-header">Files</h3>
|
86
|
+
<ul>
|
87
|
+
|
88
|
+
<li class="file"><a href="../LICENSE.html">LICENSE</a></li>
|
89
|
+
|
90
|
+
<li class="file"><a href="../README_rdoc.html">README.rdoc</a></li>
|
91
|
+
|
92
|
+
</ul>
|
93
|
+
</div>
|
94
|
+
|
95
|
+
|
96
|
+
<div id="classindex-section" class="section project-section">
|
97
|
+
<h3 class="section-header">Class Index
|
98
|
+
<span class="search-toggle"><img src="../images/find.png"
|
99
|
+
height="16" width="16" alt="[+]"
|
100
|
+
title="show/hide quicksearch" /></span></h3>
|
101
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
102
|
+
<fieldset>
|
103
|
+
<legend>Quicksearch</legend>
|
104
|
+
<input type="text" name="quicksearch" value=""
|
105
|
+
class="quicksearch-field" />
|
106
|
+
</fieldset>
|
107
|
+
</form>
|
108
|
+
|
109
|
+
<ul class="link-list">
|
110
|
+
|
111
|
+
<li><a href="../TwitterAlert.html">TwitterAlert</a></li>
|
112
|
+
|
113
|
+
<li><a href="../TwitterAlert/Account.html">TwitterAlert::Account</a></li>
|
114
|
+
|
115
|
+
<li><a href="../TwitterAlert/Alert.html">TwitterAlert::Alert</a></li>
|
116
|
+
|
117
|
+
</ul>
|
118
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
119
|
+
</div>
|
120
|
+
|
121
|
+
|
122
|
+
</div>
|
123
|
+
</div>
|
124
|
+
|
125
|
+
<div id="documentation">
|
126
|
+
<h1 class="module">TwitterAlert::Alert</h1>
|
127
|
+
|
128
|
+
<div id="description">
|
129
|
+
<p>
|
130
|
+
Mix this in to a class you want to represent the messages you’ll DM
|
131
|
+
out.
|
132
|
+
</p>
|
133
|
+
|
134
|
+
</div>
|
135
|
+
|
136
|
+
<!-- Constants -->
|
137
|
+
|
138
|
+
|
139
|
+
<!-- Attributes -->
|
140
|
+
|
141
|
+
<div id="attribute-method-details" class="method-section section">
|
142
|
+
<h3 class="section-header">Attributes</h3>
|
143
|
+
|
144
|
+
|
145
|
+
<div id="text-attribute-method" class="method-detail">
|
146
|
+
<a name="text"></a>
|
147
|
+
|
148
|
+
<div class="method-heading attribute-method-heading">
|
149
|
+
<span class="method-name">text</span><span
|
150
|
+
class="attribute-access-type">[R]</span>
|
151
|
+
</div>
|
152
|
+
|
153
|
+
<div class="method-description">
|
154
|
+
|
155
|
+
<p>
|
156
|
+
The text to be DMed out.
|
157
|
+
</p>
|
158
|
+
|
159
|
+
</div>
|
160
|
+
</div>
|
161
|
+
|
162
|
+
<div id="date-attribute-method" class="method-detail">
|
163
|
+
<a name="date"></a>
|
164
|
+
|
165
|
+
<div class="method-heading attribute-method-heading">
|
166
|
+
<span class="method-name">date</span><span
|
167
|
+
class="attribute-access-type">[R]</span>
|
168
|
+
</div>
|
169
|
+
|
170
|
+
<div class="method-description">
|
171
|
+
|
172
|
+
<p>
|
173
|
+
The date it should be DMed out.
|
174
|
+
</p>
|
175
|
+
|
176
|
+
</div>
|
177
|
+
</div>
|
178
|
+
|
179
|
+
<div id="failed-announcements-attribute-method" class="method-detail">
|
180
|
+
<a name="failed_announcements"></a>
|
181
|
+
|
182
|
+
<div class="method-heading attribute-method-heading">
|
183
|
+
<span class="method-name">failed_announcements</span><span
|
184
|
+
class="attribute-access-type">[R]</span>
|
185
|
+
</div>
|
186
|
+
|
187
|
+
<div class="method-description">
|
188
|
+
|
189
|
+
<p>
|
190
|
+
An array of hashes containing the id and error text of any DMs that
|
191
|
+
didn’t work.
|
192
|
+
</p>
|
193
|
+
|
194
|
+
</div>
|
195
|
+
</div>
|
196
|
+
|
197
|
+
</div>
|
198
|
+
|
199
|
+
|
200
|
+
<!-- Methods -->
|
201
|
+
|
202
|
+
<div id="public-class-method-details" class="method-section section">
|
203
|
+
<h3 class="section-header">Public Class Methods</h3>
|
204
|
+
|
205
|
+
|
206
|
+
<div id="new-method" class="method-detail ">
|
207
|
+
<a name="method-c-new"></a>
|
208
|
+
|
209
|
+
<div class="method-heading">
|
210
|
+
|
211
|
+
<span class="method-name">new</span><span
|
212
|
+
class="method-args">(text, date)</span>
|
213
|
+
<span class="method-click-advice">click to toggle source</span>
|
214
|
+
|
215
|
+
</div>
|
216
|
+
|
217
|
+
<div class="method-description">
|
218
|
+
|
219
|
+
<p>
|
220
|
+
Text will have to_s called on it. Date will have # and then fed to
|
221
|
+
DateTime.parse
|
222
|
+
</p>
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
<div class="method-source-code"
|
227
|
+
id="new-source">
|
228
|
+
<pre>
|
229
|
+
<span class="ruby-comment cmt"># File lib/twitter_alert/alert.rb, line 16</span>
|
230
|
+
16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">text</span>, <span class="ruby-identifier">date</span>
|
231
|
+
17: <span class="ruby-ivar">@text</span> = <span class="ruby-identifier">text</span>.<span class="ruby-identifier">to_s</span>
|
232
|
+
18: <span class="ruby-ivar">@date</span> = <span class="ruby-constant">DateTime</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">date</span>.<span class="ruby-identifier">to_s</span>)
|
233
|
+
19: <span class="ruby-ivar">@failed_announcements</span> = []
|
234
|
+
20: <span class="ruby-keyword kw">end</span></pre>
|
235
|
+
</div>
|
236
|
+
|
237
|
+
</div>
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
</div>
|
243
|
+
|
244
|
+
|
245
|
+
</div>
|
246
|
+
|
247
|
+
<div id="public-instance-method-details" class="method-section section">
|
248
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
249
|
+
|
250
|
+
|
251
|
+
<div id="add-failed-announcement-method" class="method-detail ">
|
252
|
+
<a name="method-i-add_failed_announcement"></a>
|
253
|
+
|
254
|
+
<div class="method-heading">
|
255
|
+
|
256
|
+
<span class="method-name">add_failed_announcement</span><span
|
257
|
+
class="method-args">(follower_id, error_text)</span>
|
258
|
+
<span class="method-click-advice">click to toggle source</span>
|
259
|
+
|
260
|
+
</div>
|
261
|
+
|
262
|
+
<div class="method-description">
|
263
|
+
|
264
|
+
<p>
|
265
|
+
Stores a failed announcement so that you can see who and why the failure
|
266
|
+
occured.
|
267
|
+
</p>
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
<div class="method-source-code"
|
272
|
+
id="add-failed-announcement-source">
|
273
|
+
<pre>
|
274
|
+
<span class="ruby-comment cmt"># File lib/twitter_alert/alert.rb, line 33</span>
|
275
|
+
33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_failed_announcement</span> <span class="ruby-identifier">follower_id</span>, <span class="ruby-identifier">error_text</span>
|
276
|
+
34: <span class="ruby-ivar">@failed_announcements</span> <span class="ruby-operator"><<</span> { <span class="ruby-value">:follower_id</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">follower_id</span>, <span class="ruby-value">:error_text</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">error_text</span> }
|
277
|
+
35: <span class="ruby-keyword kw">end</span></pre>
|
278
|
+
</div>
|
279
|
+
|
280
|
+
</div>
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
</div>
|
286
|
+
|
287
|
+
|
288
|
+
<div id="mark-sent-method" class="method-detail ">
|
289
|
+
<a name="method-i-mark_sent"></a>
|
290
|
+
|
291
|
+
<div class="method-heading">
|
292
|
+
|
293
|
+
<span class="method-name">mark_sent</span><span
|
294
|
+
class="method-args">()</span>
|
295
|
+
<span class="method-click-advice">click to toggle source</span>
|
296
|
+
|
297
|
+
</div>
|
298
|
+
|
299
|
+
<div class="method-description">
|
300
|
+
|
301
|
+
<p>
|
302
|
+
Marks this message as sent unless there are stored failed announcements.
|
303
|
+
</p>
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
<div class="method-source-code"
|
308
|
+
id="mark-sent-source">
|
309
|
+
<pre>
|
310
|
+
<span class="ruby-comment cmt"># File lib/twitter_alert/alert.rb, line 28</span>
|
311
|
+
28: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mark_sent</span>
|
312
|
+
29: <span class="ruby-ivar">@sent</span> = <span class="ruby-ivar">@failed_announcements</span>.<span class="ruby-identifier">empty?</span>
|
313
|
+
30: <span class="ruby-keyword kw">end</span></pre>
|
314
|
+
</div>
|
315
|
+
|
316
|
+
</div>
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
</div>
|
322
|
+
|
323
|
+
|
324
|
+
<div id="sent--method" class="method-detail ">
|
325
|
+
<a name="method-i-sent%3F"></a>
|
326
|
+
|
327
|
+
<div class="method-heading">
|
328
|
+
|
329
|
+
<span class="method-name">sent?</span><span
|
330
|
+
class="method-args">()</span>
|
331
|
+
<span class="method-click-advice">click to toggle source</span>
|
332
|
+
|
333
|
+
</div>
|
334
|
+
|
335
|
+
<div class="method-description">
|
336
|
+
|
337
|
+
<p>
|
338
|
+
Returns boolean based on whether this messages was successfully sent to all
|
339
|
+
followers or not.
|
340
|
+
</p>
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
<div class="method-source-code"
|
345
|
+
id="sent--source">
|
346
|
+
<pre>
|
347
|
+
<span class="ruby-comment cmt"># File lib/twitter_alert/alert.rb, line 23</span>
|
348
|
+
23: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sent?</span>
|
349
|
+
24: <span class="ruby-ivar">@sent</span>
|
350
|
+
25: <span class="ruby-keyword kw">end</span></pre>
|
351
|
+
</div>
|
352
|
+
|
353
|
+
</div>
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
</div>
|
359
|
+
|
360
|
+
|
361
|
+
</div>
|
362
|
+
|
363
|
+
|
364
|
+
</div>
|
365
|
+
|
366
|
+
|
367
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
368
|
+
|
369
|
+
<p>Disabled; run with --debug to generate this.</p>
|
370
|
+
|
371
|
+
</div>
|
372
|
+
|
373
|
+
<div id="validator-badges">
|
374
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
375
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
376
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
377
|
+
</div>
|
378
|
+
|
379
|
+
</body>
|
380
|
+
</html>
|
381
|
+
|