kermit 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. data/Gemfile +18 -0
  2. data/LICENSE.txt +20 -0
  3. data/README.md +54 -0
  4. data/Rakefile +31 -0
  5. data/VERSION +1 -0
  6. data/bin/kermit +24 -0
  7. data/config/config.example.yml +24 -0
  8. data/doc/Adapter.html +533 -0
  9. data/doc/Converter.html +348 -0
  10. data/doc/DAO.html +1047 -0
  11. data/doc/KermitPFC.html +927 -0
  12. data/doc/Link.html +667 -0
  13. data/doc/Logging.html +401 -0
  14. data/doc/Logging/Settings.html +170 -0
  15. data/doc/RandomAdapter.html +501 -0
  16. data/doc/RandomConverter.html +359 -0
  17. data/doc/RandomPhraseGenerator.html +317 -0
  18. data/doc/ToUser.html +815 -0
  19. data/doc/TwitterAdapter.html +550 -0
  20. data/doc/TwitterConverter.html +598 -0
  21. data/doc/USMF.html +2188 -0
  22. data/doc/User.html +1407 -0
  23. data/doc/WebSocketClient.html +316 -0
  24. data/doc/WebSocketServer.html +427 -0
  25. data/doc/_index.html +270 -0
  26. data/doc/class_list.html +53 -0
  27. data/doc/css/common.css +1 -0
  28. data/doc/css/full_list.css +57 -0
  29. data/doc/css/style.css +328 -0
  30. data/doc/file.LICENSE.html +73 -0
  31. data/doc/file.README.html +123 -0
  32. data/doc/file_list.html +58 -0
  33. data/doc/frames.html +28 -0
  34. data/doc/index.html +123 -0
  35. data/doc/js/app.js +214 -0
  36. data/doc/js/full_list.js +173 -0
  37. data/doc/js/jquery.js +4 -0
  38. data/doc/method_list.html +764 -0
  39. data/doc/top-level-namespace.html +138 -0
  40. data/lib/business/adapter/adapter.rb +39 -0
  41. data/lib/business/adapter/random_adapter.rb +50 -0
  42. data/lib/business/adapter/twitter_adapter.rb +75 -0
  43. data/lib/business/converter/converter.rb +24 -0
  44. data/lib/business/converter/random_converter.rb +42 -0
  45. data/lib/business/converter/twitter_converter.rb +164 -0
  46. data/lib/business/random_phrase_generator.rb +39 -0
  47. data/lib/helper/DAO.rb +94 -0
  48. data/lib/helper/settings.rb +11 -0
  49. data/lib/helper/websocket_client.rb +37 -0
  50. data/lib/helper/websocket_server.rb +65 -0
  51. data/lib/kermitpfc.rb +164 -0
  52. data/lib/logging.rb +31 -0
  53. data/lib/model/USMF/USMF.rb +98 -0
  54. data/lib/model/USMF/link.rb +30 -0
  55. data/lib/model/USMF/to_user.rb +32 -0
  56. data/lib/model/USMF/user.rb +41 -0
  57. data/lib/model/templates/USMF +56 -0
  58. data/lib/model/templates/atom.xml +74 -0
  59. data/lib/model/templates/example +59 -0
  60. data/lib/model/templates/rss.xml +68 -0
  61. data/lib/model/templates/template +49 -0
  62. data/lib/model/templates/tweet +116 -0
  63. data/spec/DAO_spec.rb +64 -0
  64. data/spec/random_adapter_spec.rb +24 -0
  65. data/spec/random_converter_spec.rb +115 -0
  66. data/spec/random_phrase_generator_spec.rb +15 -0
  67. data/spec/twitter_adapter_spec.rb +24 -0
  68. data/spec/twitter_converter_spec.rb +132 -0
  69. data/websocket_client.html +20 -0
  70. metadata +253 -0
data/Gemfile ADDED
@@ -0,0 +1,18 @@
1
+ source "http://rubygems.org"
2
+
3
+ group :development do
4
+ gem "rdoc", "~> 3.12"
5
+ gem "jeweler", "~> 1.8.4"
6
+ gem 'rspec', "~> 2.11.0"
7
+ gem 'yard', "~> 0.8.2.1"
8
+ end
9
+
10
+ gem 'rake', "~> 0.9.2.2"
11
+ gem 'em-http-request', "0.2.7", :require => 'em-http'
12
+ gem 'em-websocket', "~> 0.3.8"
13
+ gem 'redis', "~> 3.0.1"
14
+ gem 'json', "~> 1.7.3"
15
+ gem 'twitter-stream', "~> 0.1.16"
16
+ gem 'settingslogic', "~> 2.0.8"
17
+
18
+ gem 'commander', "~> 4.1.2"
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012 Daniel Machado Fernández
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,54 @@
1
+ # Kermit
2
+
3
+ ## What's this?
4
+
5
+ KermitPFC-core is a framework that can collect information from different social networks for data mining purposes.
6
+ It also allows different streams serve under a common way to treat data as a single social network using the USMF form implemented by Tawlk.
7
+
8
+
9
+ ## Intro
10
+
11
+ kermitpfc-core is based on a series of classes to be used to ensure proper functionality of the social network you want to implement, these classes are Adapter to collect social network statuses, Converter to parse the previous statuses in the USMF model (with their respective classes). To facilitate the publish action of USMF, JSON service is used with the help of the Redis Pub / Sub module (which implements the core, Redis must be installed in server mode).
12
+
13
+
14
+ ## How to use
15
+
16
+ KermitPFC-core has got a Twitter implementation for default and a Random Phrase Generator to mix the statuses, to use it:
17
+
18
+ First, you must fill the config.example.yml file with your personal data (Redis connection, SocialNetwork credentials, trackwords, ...) you can rename it as you want (config.yml could be a good name).
19
+
20
+ Then, you need have been installed a redis-server database (and actually running)
21
+
22
+ ```bash
23
+ $ sudo apt-get install redis-server
24
+ ```
25
+
26
+ and a ruby version to launch the application
27
+
28
+ ```bash
29
+ $ sudo apt-get install ruby
30
+ ```
31
+ Finally you only need to downlad the gem from the source (from github, rubygems,...) and install it
32
+
33
+ ```bash
34
+ $ gem install kermit
35
+ ```
36
+
37
+ * maybe you need permisions to install
38
+
39
+ and execute it
40
+
41
+ ```bash
42
+ $ kermit --path [config.yml_path]
43
+ ```
44
+ p.ex
45
+
46
+ ```bash
47
+ $ kermit --path ../config/config.yml
48
+ ```
49
+
50
+ or
51
+
52
+ ```bash
53
+ $ kermit --path config.yml
54
+ ```
@@ -0,0 +1,31 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "kermit"
18
+ gem.homepage = "http://github.com/danielmachado/kermit"
19
+ #gem.license = "MIT"
20
+ gem.summary = %Q{Allows to retrieve info from diferent Data Streams}
21
+ gem.description = %Q{Allows to retrieve info from diferent Data Streams for data mining purpouses}
22
+ gem.email = "daniel.machado.fernandez@gmail.com"
23
+ gem.authors = ["Daniel Machado Fernández"]
24
+ end
25
+ Jeweler::RubygemsDotOrgTasks.new
26
+
27
+ require 'rspec/core/rake_task'
28
+
29
+ RSpec::Core::RakeTask.new(:spec)
30
+
31
+ task :default => :spec
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.0
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require 'yaml'
5
+ require_relative '../lib/logging'
6
+ require 'commander/import'
7
+
8
+ program :name, 'kermit'
9
+ program :version, '1.0.0'
10
+ program :description, 'Framework which allows retrieve status from diverse social network and publish it in a websocket on a USMF standard way'
11
+ program :help, 'Author', 'Daniel Machado Fernandez'
12
+
13
+ default_command :start
14
+
15
+ command :start do |c|
16
+ c.syntax = 'kermit start [options]'
17
+ c.description = 'Start the websocket server which is the responsable to distribute the USMFs to the data miners, retrieve new statuses from the Streams, converts it in USMF and publish it on the websocket.'
18
+ c.option '--path STRING', String, 'path of the config.yml file'
19
+ c.action do |args, options|
20
+ options.default :path => '../config/config.yml'
21
+ Logging::Settings.source options.path
22
+ Logging::KermitPFC.new
23
+ end
24
+ end
@@ -0,0 +1,24 @@
1
+ redis:
2
+ db: #Database name where you want to store the statuses
3
+ twitter: #Key under you want to found your tweets
4
+ # you must add keys for your own stream implementations
5
+ host: #address of your Redis-Server
6
+ port: #port of your Redis-Server
7
+ password: #Redis password
8
+ #Websocket address to publish the statuses
9
+ websocket:
10
+ host: #address of your websocket server
11
+ port: #port of your websocket server
12
+ #for each Stream implementation you must define its specific params.
13
+ twitter:
14
+ streams:#number of streams you want
15
+ path: /1/statuses/filter.json
16
+ track: #Keywords you want Twitter tracks and filter the Stream (one for each stream)
17
+ 1: #specific keyword for each twitter stream
18
+ 2: #another keyword to track
19
+ login: #Your Twitter username
20
+ pass: #Your Twitter password
21
+ port: #Port, in case you need to specific one.
22
+ #RandomPhraseGenerator Stream
23
+ rpg: #true / false if you want to enable this stream
24
+ #if you want to add more Social Networks/Streams, it can be a good idea to follow the previous Twitter structure.
@@ -0,0 +1,533 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Adapter
8
+
9
+ &mdash; Documentation by YARD 0.8.2.1
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '';
20
+ framesUrl = "frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="_index.html">Index (A)</a> &raquo;
35
+
36
+
37
+ <span class="title">Adapter</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Adapter
67
+ <span class="abstract note title">Abstract</span>
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Adapter</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+ <dt class="r2">Includes:</dt>
94
+ <dd class="r2"><span class='object_link'><a href="Logging.html" title="Logging (module)">Logging</a></span></dd>
95
+
96
+
97
+
98
+
99
+
100
+ <dt class="r1 last">Defined in:</dt>
101
+ <dd class="r1 last">lib/business/adapter/adapter.rb</dd>
102
+
103
+ </dl>
104
+ <div class="clear"></div>
105
+
106
+ <h2>Overview</h2><div class="docstring">
107
+ <div class="discussion">
108
+ <div class="note abstract">
109
+ <strong>This class is abstract.</strong>
110
+ <div class='inline'></div>
111
+ </div>
112
+ <p>
113
+ You must implement this class to adapt your data stream in our framework
114
+ </p>
115
+
116
+
117
+ </div>
118
+ </div>
119
+ <div class="tags">
120
+
121
+ <p class="tag_title">Author:</p>
122
+ <ul class="author">
123
+
124
+ <li>
125
+
126
+
127
+
128
+
129
+
130
+ <div class='inline'><p>
131
+ Daniel Machado Fernandez
132
+ </p>
133
+ </div>
134
+
135
+ </li>
136
+
137
+ </ul>
138
+ <p class="tag_title">Version:</p>
139
+ <ul class="version">
140
+
141
+ <li>
142
+
143
+
144
+
145
+
146
+
147
+ <div class='inline'><p>
148
+ 1.0
149
+ </p>
150
+ </div>
151
+
152
+ </li>
153
+
154
+ </ul>
155
+
156
+ </div><div id="subclasses">
157
+ <h2>Direct Known Subclasses</h2>
158
+ <p class="children"><span class='object_link'><a href="RandomAdapter.html" title="RandomAdapter (class)">RandomAdapter</a></span>, <span class='object_link'><a href="TwitterAdapter.html" title="TwitterAdapter (class)">TwitterAdapter</a></span></p>
159
+ </div>
160
+
161
+ <h2>Constant Summary</h2>
162
+
163
+
164
+
165
+
166
+ <h2>Constant Summary</h2>
167
+
168
+ <h3 class="inherited">Constants included
169
+ from <span class='object_link'><a href="Logging.html" title="Logging (module)">Logging</a></span></h3>
170
+ <p class="inherited"><span class='object_link'><a href="Logging.html#KermitPFC-constant" title="Logging::KermitPFC (constant)">Logging::KermitPFC</a></span></p>
171
+
172
+
173
+
174
+
175
+
176
+
177
+ <h2>
178
+ Instance Method Summary
179
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
180
+ </h2>
181
+
182
+ <ul class="summary">
183
+
184
+ <li class="public ">
185
+ <span class="summary_signature">
186
+
187
+ <a href="#connect_stream-instance_method" title="#connect_stream (instance method)">- (Object) <strong>connect_stream</strong>(stream = 1) </a>
188
+
189
+
190
+
191
+ </span>
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+ <span class="summary_desc"><div class='inline'><p>
202
+ Connects to a particular data stream.
203
+ </p>
204
+ </div></span>
205
+
206
+ </li>
207
+
208
+
209
+ <li class="public ">
210
+ <span class="summary_signature">
211
+
212
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Adapter) <strong>initialize</strong> </a>
213
+
214
+
215
+
216
+ </span>
217
+
218
+
219
+ <span class="note title constructor">constructor</span>
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+ <span class="summary_desc"><div class='inline'><p>
229
+ Initializes the Adapter to run the logger.
230
+ </p>
231
+ </div></span>
232
+
233
+ </li>
234
+
235
+
236
+ <li class="public ">
237
+ <span class="summary_signature">
238
+
239
+ <a href="#persist-instance_method" title="#persist (instance method)">- (Object) <strong>persist</strong>(status) </a>
240
+
241
+
242
+
243
+ </span>
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+
253
+ <span class="summary_desc"><div class='inline'><p>
254
+ Persist the status retrieved from the data stream.
255
+ </p>
256
+ </div></span>
257
+
258
+ </li>
259
+
260
+
261
+ </ul>
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="Logging.html" title="Logging (module)">Logging</a></span></h3>
274
+ <p class="inherited"><span class='object_link'><a href="Logging.html#logger-instance_method" title="Logging#logger (method)">#logger</a></span>, <span class='object_link'><a href="Logging.html#logger-class_method" title="Logging.logger (method)">logger</a></span></p>
275
+ <div id="constructor_details" class="method_details_list">
276
+ <h2>Constructor Details</h2>
277
+
278
+ <div class="method_details first">
279
+ <h3 class="signature first" id="initialize-instance_method">
280
+
281
+ - (<tt><span class='object_link'><a href="" title="Adapter (class)">Adapter</a></span></tt>) <strong>initialize</strong>
282
+
283
+
284
+
285
+
286
+
287
+ </h3><div class="docstring">
288
+ <div class="discussion">
289
+ <p>
290
+ Initializes the Adapter to run the logger
291
+ </p>
292
+
293
+
294
+ </div>
295
+ </div>
296
+ <div class="tags">
297
+
298
+ <p class="tag_title">Raises:</p>
299
+ <ul class="raise">
300
+
301
+ <li>
302
+
303
+
304
+ <span class='type'>(<tt>Exception</tt>)</span>
305
+
306
+
307
+
308
+ &mdash;
309
+ <div class='inline'><p>
310
+ if the method hasn&#8217;t been implemented yet
311
+ </p>
312
+ </div>
313
+
314
+ </li>
315
+
316
+ </ul>
317
+
318
+ </div><table class="source_code">
319
+ <tr>
320
+ <td>
321
+ <pre class="lines">
322
+
323
+
324
+ 14
325
+ 15
326
+ 16
327
+ 17
328
+ 18
329
+ 19</pre>
330
+ </td>
331
+ <td>
332
+ <pre class="code"><span class="info file"># File 'lib/business/adapter/adapter.rb', line 14</span>
333
+
334
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
335
+
336
+ <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_fatal'>fatal</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>The method initialize in Adapter must be implemented</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
337
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>This method must be implemented</span><span class='tstring_end'>'</span></span>
338
+
339
+ <span class='kw'>end</span></pre>
340
+ </td>
341
+ </tr>
342
+ </table>
343
+ </div>
344
+
345
+ </div>
346
+
347
+
348
+ <div id="instance_method_details" class="method_details_list">
349
+ <h2>Instance Method Details</h2>
350
+
351
+
352
+ <div class="method_details first">
353
+ <h3 class="signature first" id="connect_stream-instance_method">
354
+
355
+ - (<tt>Object</tt>) <strong>connect_stream</strong>(stream = 1)
356
+
357
+
358
+
359
+
360
+
361
+ </h3><div class="docstring">
362
+ <div class="discussion">
363
+ <p>
364
+ Connects to a particular data stream
365
+ </p>
366
+
367
+
368
+ </div>
369
+ </div>
370
+ <div class="tags">
371
+ <p class="tag_title">Parameters:</p>
372
+ <ul class="param">
373
+
374
+ <li>
375
+
376
+ <span class='name'>stream</span>
377
+
378
+
379
+ <span class='type'>(<tt>Integer</tt>)</span>
380
+
381
+
382
+ <em class="default">(defaults to: <tt>1</tt>)</em>
383
+
384
+
385
+ &mdash;
386
+ <div class='inline'><p>
387
+ the number of the stream to identify it
388
+ </p>
389
+ </div>
390
+
391
+ </li>
392
+
393
+ </ul>
394
+
395
+ <p class="tag_title">Raises:</p>
396
+ <ul class="raise">
397
+
398
+ <li>
399
+
400
+
401
+ <span class='type'>(<tt>Exception</tt>)</span>
402
+
403
+
404
+
405
+ &mdash;
406
+ <div class='inline'><p>
407
+ if the method hasn&#8217;t been implemented yet
408
+ </p>
409
+ </div>
410
+
411
+ </li>
412
+
413
+ </ul>
414
+
415
+ </div><table class="source_code">
416
+ <tr>
417
+ <td>
418
+ <pre class="lines">
419
+
420
+
421
+ 25
422
+ 26
423
+ 27
424
+ 28</pre>
425
+ </td>
426
+ <td>
427
+ <pre class="code"><span class="info file"># File 'lib/business/adapter/adapter.rb', line 25</span>
428
+
429
+ <span class='kw'>def</span> <span class='id identifier rubyid_connect_stream'>connect_stream</span> <span class='lparen'>(</span><span class='id identifier rubyid_stream'>stream</span><span class='op'>=</span><span class='int'>1</span><span class='rparen'>)</span>
430
+ <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_fatal'>fatal</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>The method connect_stream in Adapter must be implemented</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
431
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>This method must be implemented</span><span class='tstring_end'>'</span></span>
432
+ <span class='kw'>end</span></pre>
433
+ </td>
434
+ </tr>
435
+ </table>
436
+ </div>
437
+
438
+ <div class="method_details ">
439
+ <h3 class="signature " id="persist-instance_method">
440
+
441
+ - (<tt>Object</tt>) <strong>persist</strong>(status)
442
+
443
+
444
+
445
+
446
+
447
+ </h3><div class="docstring">
448
+ <div class="discussion">
449
+ <p>
450
+ Persist the status retrieved from the data stream
451
+ </p>
452
+
453
+
454
+ </div>
455
+ </div>
456
+ <div class="tags">
457
+ <p class="tag_title">Parameters:</p>
458
+ <ul class="param">
459
+
460
+ <li>
461
+
462
+ <span class='name'>status</span>
463
+
464
+
465
+ <span class='type'>(<tt>String</tt>)</span>
466
+
467
+
468
+
469
+ &mdash;
470
+ <div class='inline'><p>
471
+ the status retrieved from the data stream
472
+ </p>
473
+ </div>
474
+
475
+ </li>
476
+
477
+ </ul>
478
+
479
+ <p class="tag_title">Raises:</p>
480
+ <ul class="raise">
481
+
482
+ <li>
483
+
484
+
485
+ <span class='type'>(<tt>Exception</tt>)</span>
486
+
487
+
488
+
489
+ &mdash;
490
+ <div class='inline'><p>
491
+ if the method hasn&#8217;t been implemented yet
492
+ </p>
493
+ </div>
494
+
495
+ </li>
496
+
497
+ </ul>
498
+
499
+ </div><table class="source_code">
500
+ <tr>
501
+ <td>
502
+ <pre class="lines">
503
+
504
+
505
+ 34
506
+ 35
507
+ 36
508
+ 37</pre>
509
+ </td>
510
+ <td>
511
+ <pre class="code"><span class="info file"># File 'lib/business/adapter/adapter.rb', line 34</span>
512
+
513
+ <span class='kw'>def</span> <span class='id identifier rubyid_persist'>persist</span> <span class='id identifier rubyid_status'>status</span>
514
+ <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_fatal'>fatal</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>The method persist in Adapter must be implemented</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
515
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>This method must be implemented</span><span class='tstring_end'>'</span></span>
516
+ <span class='kw'>end</span></pre>
517
+ </td>
518
+ </tr>
519
+ </table>
520
+ </div>
521
+
522
+ </div>
523
+
524
+ </div>
525
+
526
+ <div id="footer">
527
+ Generated on Sat Aug 18 16:24:08 2012 by
528
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
529
+ 0.8.2.1 (ruby-1.9.2).
530
+ </div>
531
+
532
+ </body>
533
+ </html>