sofa 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/.document +5 -0
  2. data/.yardopts +6 -0
  3. data/Rakefile +76 -0
  4. data/doc/Sofa.html +85 -0
  5. data/doc/Sofa/Mapping.html +168 -0
  6. data/doc/Sofa/Mapping/ClassMethods.html +314 -0
  7. data/doc/Sofa/Mapping/InstanceMethods.html +358 -0
  8. data/doc/Sofa/TVRage.html +85 -0
  9. data/doc/Sofa/TVRage/Episode.html +358 -0
  10. data/doc/Sofa/TVRage/Schedule.html +207 -0
  11. data/doc/Sofa/TVRage/Season.html +236 -0
  12. data/doc/Sofa/TVRage/Show.html +904 -0
  13. data/doc/Sofa/TVRage/Show/ShowNotFound.html +92 -0
  14. data/doc/Sofa/Version.html +100 -0
  15. data/doc/_index.html +206 -0
  16. data/doc/class_list.html +137 -0
  17. data/doc/css/common.css +1 -0
  18. data/doc/css/full_list.css +23 -0
  19. data/doc/css/style.css +261 -0
  20. data/doc/file.README.html +120 -0
  21. data/doc/file_list.html +29 -0
  22. data/doc/index.html +120 -0
  23. data/doc/js/app.js +91 -0
  24. data/doc/js/full_list.js +39 -0
  25. data/doc/js/jquery.js +19 -0
  26. data/doc/method_list.html +192 -0
  27. data/doc/top-level-namespace.html +80 -0
  28. data/lib/sofa.rb +7 -0
  29. data/lib/sofa/mapping.rb +108 -0
  30. data/lib/sofa/tvrage.rb +10 -0
  31. data/lib/sofa/tvrage/episode.rb +56 -0
  32. data/lib/sofa/tvrage/schedule.rb +25 -0
  33. data/lib/sofa/tvrage/season.rb +36 -0
  34. data/lib/sofa/tvrage/show.rb +132 -0
  35. data/lib/sofa/version.rb +8 -0
  36. data/sofa.gemspec +113 -0
  37. data/spec/fixtures/tvrage/cases/castle.xml +228 -0
  38. data/spec/fixtures/tvrage/cases/community.xml +109 -0
  39. data/spec/fixtures/tvrage/cases/live_with_regis_and_kelly.xml +56237 -0
  40. data/spec/fixtures/tvrage/episode_info.xml +30 -0
  41. data/spec/fixtures/tvrage/episode_list.xml +1183 -0
  42. data/spec/fixtures/tvrage/episode_list_one_season.xml +17 -0
  43. data/spec/fixtures/tvrage/episode_list_two_episodes.xml +25 -0
  44. data/spec/fixtures/tvrage/full_schedule.xml +4731 -0
  45. data/spec/fixtures/tvrage/full_show_info.xml +1291 -0
  46. data/spec/fixtures/tvrage/quickinfo.html +17 -0
  47. data/spec/fixtures/tvrage/quickinfo_missing.html +1 -0
  48. data/spec/fixtures/tvrage/search.xml +151 -0
  49. data/spec/fixtures/tvrage/show_info.xml +42 -0
  50. data/spec/fixtures/tvrage/show_info_blank.xml +3 -0
  51. data/spec/fixtures/tvrage/single_episode.xml +8 -0
  52. data/spec/spec.opts +1 -0
  53. metadata +57 -32
@@ -0,0 +1,358 @@
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 name="Content-Type" content="text/html; charset=UTF-8" />
6
+ <title>Module: Sofa::Mapping::InstanceMethods</title>
7
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
8
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+
10
+ <script type="text/javascript" charset="utf-8">
11
+ relpath = '../..';
12
+ if (relpath != '') relpath += '/';
13
+ </script>
14
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
15
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
16
+
17
+ </head>
18
+ <body>
19
+ <div id="header">
20
+ <div id="menu">
21
+
22
+ <a href="../../_index.html">Index (I)</a> &raquo;
23
+ <a title="Sofa" href="../../Sofa.html">Sofa</a> &raquo; <a title="Mapping" href="../Mapping.html">Mapping</a>
24
+ &raquo;
25
+ <span class="title">InstanceMethods</span>
26
+
27
+ </div>
28
+
29
+ <div id="search">
30
+ <a id="class_list_link" href="#">Namespace List</a>
31
+ <a id="method_list_link" href="#">Method List</a>
32
+ <a id ="file_list_link" href="#">File List</a>
33
+ </div>
34
+
35
+ <div class="clear"></div>
36
+ </div>
37
+
38
+ <iframe id="search_frame"></iframe>
39
+
40
+ <div id="content"><h1>Module: Sofa::Mapping::InstanceMethods
41
+
42
+
43
+ </h1>
44
+
45
+ <dl class="box">
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+ <dt class="r1 last">Defined in:</dt>
54
+ <dd class="r1 last">lib/sofa/mapping.rb</dd>
55
+
56
+ </dl>
57
+ <div class="clear"></div>
58
+
59
+
60
+
61
+
62
+ <h2>Method Summary</h2>
63
+ <ul class="summary">
64
+
65
+ <li class="public ">
66
+ <span class="summary_signature"><a title="#== (instance method)" href="#%3D%3D-instance_method">- (Boolean) <strong>==</strong>(obj) </a>
67
+
68
+ </span>
69
+
70
+
71
+
72
+
73
+
74
+
75
+ <span class="summary_desc">Compares two objects based on their attributes.</span>
76
+
77
+ </li>
78
+
79
+
80
+ <li class="public ">
81
+ <span class="summary_signature"><a title="#attributes (instance method)" href="#attributes-instance_method">- (Hash&lt;Symbol, Object&gt;) <strong>attributes</strong> </a>
82
+
83
+ </span>
84
+
85
+
86
+
87
+
88
+
89
+
90
+ <span class="summary_desc">Returns hash of all the attributes, with attribute names as keys and attribute values as values.</span>
91
+
92
+ </li>
93
+
94
+
95
+ <li class="public ">
96
+ <span class="summary_signature"><a title="#update_with_mapping (instance method)" href="#update_with_mapping-instance_method">- (Object) <strong>update_with_mapping</strong>(attributes = {}) </a>
97
+
98
+ </span>
99
+
100
+
101
+
102
+
103
+
104
+
105
+ <span class="summary_desc">Updates all the attributes from the Hash.</span>
106
+
107
+ </li>
108
+
109
+
110
+ </ul>
111
+
112
+
113
+
114
+ <div id="method_details">
115
+ <h2>Method Details</h2>
116
+
117
+ <div class="method_details first">
118
+ <p class="signature first" id="==-instance_method">
119
+
120
+ - (<tt>Boolean</tt>) <strong>==</strong>(obj)
121
+
122
+
123
+
124
+ </p><div class="docstring">
125
+ <div class="discussion">
126
+ <p>Compares two objects based on their attributes.</p>
127
+
128
+ </div>
129
+ </div>
130
+ <div class="tags">
131
+ <h3>Parameters:</h3>
132
+ <ul class="param">
133
+
134
+ <li>
135
+
136
+ <span class='type'>(<tt>Object</tt>)</span>
137
+
138
+
139
+ <span class='name'>obj</span>
140
+
141
+
142
+
143
+ &mdash;
144
+ The object to compare with
145
+
146
+ </li>
147
+
148
+ </ul>
149
+ <h3>Returns:</h3>
150
+ <ul class="return">
151
+
152
+ <li>
153
+
154
+ <span class='type'>(<tt>Boolean</tt>)</span>
155
+
156
+
157
+
158
+
159
+ &mdash;
160
+ Whether all attributes are the same
161
+
162
+ </li>
163
+
164
+ </ul>
165
+
166
+ </div><table class="source_code">
167
+ <tr>
168
+ <td>
169
+ <pre class="lines">
170
+
171
+
172
+ 48
173
+ 49
174
+ 50
175
+ 51
176
+ 52
177
+ 53
178
+ 54
179
+ 55
180
+ 56
181
+ 57</pre>
182
+ </td>
183
+ <td>
184
+ <pre class="code"><span class="info file"># File 'lib/sofa/mapping.rb', line 48</span>
185
+
186
+ def ==(obj)
187
+ if (klass = self.class) == obj.class
188
+ klass.mappings.inject(true) do |result, to_from|
189
+ to = to_from.last || to_from.first
190
+ result &&= (obj.send(to) == self.send(to))
191
+ end
192
+ else
193
+ super
194
+ end
195
+ end</pre>
196
+ </td>
197
+ </tr>
198
+ </table>
199
+ </div>
200
+
201
+ <div class="method_details ">
202
+ <p class="signature " id="attributes-instance_method">
203
+
204
+ - (<tt>Hash&lt;Symbol, Object&gt;</tt>) <strong>attributes</strong>
205
+
206
+
207
+
208
+ </p><div class="docstring">
209
+ <div class="discussion">
210
+ <p>Returns hash of all the attributes, with attribute names as keys and attribute values as values.</p>
211
+
212
+ </div>
213
+ </div>
214
+ <div class="tags">
215
+ <h3>Returns:</h3>
216
+ <ul class="return">
217
+
218
+ <li>
219
+
220
+ <span class='type'>(<tt>Hash&lt;Symbol, Object&gt;</tt>)</span>
221
+
222
+
223
+
224
+
225
+ &mdash;
226
+ Hash of all attributes
227
+
228
+ </li>
229
+
230
+ </ul>
231
+
232
+ <h3>See Also:</h3>
233
+ <ul class="see">
234
+
235
+ <li><a title="Sofa::Mapping::ClassMethods#maps" href="ClassMethods.html#maps-instance_method">Sofa::Mapping::ClassMethods#maps</a></li>
236
+
237
+ </ul>
238
+
239
+ </div><table class="source_code">
240
+ <tr>
241
+ <td>
242
+ <pre class="lines">
243
+
244
+
245
+ 20
246
+ 21
247
+ 22
248
+ 23
249
+ 24
250
+ 25
251
+ 26
252
+ 27</pre>
253
+ </td>
254
+ <td>
255
+ <pre class="code"><span class="info file"># File 'lib/sofa/mapping.rb', line 20</span>
256
+
257
+ def attributes
258
+ klass = self.class
259
+ klass.mappings.values.inject({}) do |attrs, to|
260
+ next unless to
261
+ attrs[to] = send(to)
262
+ attrs
263
+ end
264
+ end</pre>
265
+ </td>
266
+ </tr>
267
+ </table>
268
+ </div>
269
+
270
+ <div class="method_details ">
271
+ <p class="signature " id="update_with_mapping-instance_method">
272
+
273
+ - (<tt>Object</tt>) <strong>update_with_mapping</strong>(attributes = {})
274
+
275
+
276
+
277
+ </p><div class="docstring">
278
+ <div class="discussion">
279
+ <p>Updates all the attributes from the Hash.</p>
280
+
281
+ </div>
282
+ </div>
283
+ <div class="tags">
284
+ <h3>Parameters:</h3>
285
+ <ul class="param">
286
+
287
+ <li>
288
+
289
+ <span class='type'>(<tt>Hash&lt;Symbol, Object&gt;</tt>)</span>
290
+
291
+
292
+ <span class='name'>attributes</span>
293
+
294
+
295
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
296
+
297
+
298
+ &mdash;
299
+ A hash with attribute names as keys and attribute values as values
300
+
301
+ </li>
302
+
303
+ </ul>
304
+
305
+ <h3>See Also:</h3>
306
+ <ul class="see">
307
+
308
+ <li><a title="Sofa::Mapping::ClassMethods#maps" href="ClassMethods.html#maps-instance_method">Sofa::Mapping::ClassMethods#maps</a></li>
309
+
310
+ </ul>
311
+
312
+ </div><table class="source_code">
313
+ <tr>
314
+ <td>
315
+ <pre class="lines">
316
+
317
+
318
+ 33
319
+ 34
320
+ 35
321
+ 36
322
+ 37
323
+ 38
324
+ 39
325
+ 40
326
+ 41
327
+ 42</pre>
328
+ </td>
329
+ <td>
330
+ <pre class="code"><span class="info file"># File 'lib/sofa/mapping.rb', line 33</span>
331
+
332
+ def update_with_mapping(attributes = {})
333
+ attributes.each do |key, value|
334
+ next unless (klass = self.class) and key.respond_to?(:to_sym) and to = klass.mappings[key.to_sym]
335
+
336
+ block = klass.mappings_procs[to]
337
+ value = block.call(value) if block
338
+
339
+ instance_variable_set("@#{to}", value)
340
+ end
341
+ end</pre>
342
+ </td>
343
+ </tr>
344
+ </table>
345
+ </div>
346
+
347
+ </div>
348
+
349
+ </div>
350
+
351
+ <div id="footer">
352
+ Generated on Sat Nov 21 20:13:52 2009 by
353
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
354
+ 0.4.0 (ruby-1.8.7).
355
+ </div>
356
+
357
+ </body>
358
+ </html>
@@ -0,0 +1,85 @@
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 name="Content-Type" content="text/html; charset=UTF-8" />
6
+ <title>Module: Sofa::TVRage</title>
7
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
8
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+
10
+ <script type="text/javascript" charset="utf-8">
11
+ relpath = '..';
12
+ if (relpath != '') relpath += '/';
13
+ </script>
14
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
15
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
16
+
17
+ </head>
18
+ <body>
19
+ <div id="header">
20
+ <div id="menu">
21
+
22
+ <a href="../_index.html">Index (T)</a> &raquo;
23
+ <a title="Sofa" href="../Sofa.html">Sofa</a>
24
+ &raquo;
25
+ <span class="title">TVRage</span>
26
+
27
+ </div>
28
+
29
+ <div id="search">
30
+ <a id="class_list_link" href="#">Namespace List</a>
31
+ <a id="method_list_link" href="#">Method List</a>
32
+ <a id ="file_list_link" href="#">File List</a>
33
+ </div>
34
+
35
+ <div class="clear"></div>
36
+ </div>
37
+
38
+ <iframe id="search_frame"></iframe>
39
+
40
+ <div id="content"><h1>Module: Sofa::TVRage
41
+
42
+
43
+ </h1>
44
+
45
+ <dl class="box">
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+ <dt class="r1 last">Defined in:</dt>
54
+ <dd class="r1 last">lib/sofa/tvrage.rb<span class="defines">,<br />
55
+ lib/sofa/tvrage/show.rb,<br /> lib/sofa/tvrage/season.rb,<br /> lib/sofa/tvrage/episode.rb,<br /> lib/sofa/tvrage/schedule.rb</span>
56
+ </dd>
57
+
58
+ </dl>
59
+ <div class="clear"></div>
60
+
61
+ <h2>Defined Under Namespace</h2>
62
+ <p class="children">
63
+
64
+
65
+
66
+
67
+ <strong class="classes">Classes:</strong> <a title="Episode" href="TVRage/Episode.html">Episode</a>, <a title="Schedule" href="TVRage/Schedule.html">Schedule</a>, <a title="Season" href="TVRage/Season.html">Season</a>, <a title="Show" href="TVRage/Show.html">Show</a>
68
+
69
+
70
+ </p>
71
+
72
+
73
+
74
+
75
+
76
+ </div>
77
+
78
+ <div id="footer">
79
+ Generated on Sat Nov 21 20:13:52 2009 by
80
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
81
+ 0.4.0 (ruby-1.8.7).
82
+ </div>
83
+
84
+ </body>
85
+ </html>
@@ -0,0 +1,358 @@
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 name="Content-Type" content="text/html; charset=UTF-8" />
6
+ <title>Class: Sofa::TVRage::Episode</title>
7
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
8
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+
10
+ <script type="text/javascript" charset="utf-8">
11
+ relpath = '../..';
12
+ if (relpath != '') relpath += '/';
13
+ </script>
14
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
15
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
16
+
17
+ </head>
18
+ <body>
19
+ <div id="header">
20
+ <div id="menu">
21
+
22
+ <a href="../../_index.html">Index (E)</a> &raquo;
23
+ <a title="Sofa" href="../../Sofa.html">Sofa</a> &raquo; <a title="TVRage" href="../TVRage.html">TVRage</a>
24
+ &raquo;
25
+ <span class="title">Episode</span>
26
+
27
+ </div>
28
+
29
+ <div id="search">
30
+ <a id="class_list_link" href="#">Namespace List</a>
31
+ <a id="method_list_link" href="#">Method List</a>
32
+ <a id ="file_list_link" href="#">File List</a>
33
+ </div>
34
+
35
+ <div class="clear"></div>
36
+ </div>
37
+
38
+ <iframe id="search_frame"></iframe>
39
+
40
+ <div id="content"><h1>Class: Sofa::TVRage::Episode
41
+
42
+
43
+ </h1>
44
+
45
+ <dl class="box">
46
+
47
+ <dt class="r1">Inherits:</dt>
48
+ <dd class="r1">
49
+ <span class="inheritName">Object</span>
50
+
51
+ </dd>
52
+
53
+
54
+
55
+
56
+
57
+
58
+ <dt class="r2">Includes:</dt>
59
+ <dd class="r2"><a title="Sofa::Mapping" href="../Mapping.html">Sofa::Mapping</a></dd>
60
+
61
+
62
+
63
+
64
+ <dt class="r1 last">Defined in:</dt>
65
+ <dd class="r1 last">lib/sofa/tvrage/episode.rb</dd>
66
+
67
+ </dl>
68
+ <div class="clear"></div>
69
+
70
+ <h2>Overview</h2><div class="docstring">
71
+ <div class="discussion">
72
+ <p>This class holds the XML information of a single episode as per the TVRage API.</p>
73
+
74
+ </div>
75
+ </div>
76
+ <div class="tags">
77
+
78
+ <h3>See Also:</h3>
79
+ <ul class="see">
80
+
81
+ <li><a title="TVRage API : Episode List" href="http://services.tvrage.com/index.php?page=public">TVRage API : Episode List</a></li>
82
+
83
+ </ul>
84
+
85
+ </div>
86
+
87
+
88
+
89
+
90
+
91
+ <h2>Attribute Summary</h2>
92
+ <ul class="summary">
93
+
94
+ <li class="public ">
95
+ <span class="summary_signature"><a title="#season_num (instance method)" href="#season_num-instance_method">- (Object) <strong>season_num</strong> </a>
96
+
97
+ </span>
98
+
99
+ <span class="note title readonly">readonly</span>
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+ <span class="summary_desc">The season number of the Season this Episode belongs to.</span>
108
+
109
+ </li>
110
+
111
+
112
+ </ul>
113
+
114
+
115
+ <h2>Method Summary</h2>
116
+ <ul class="summary">
117
+
118
+ <li class="public ">
119
+ <span class="summary_signature"><a title="#initialize (instance method)" href="#initialize-instance_method">- (Episode) <strong>initialize</strong>(info) </a>
120
+
121
+ </span>
122
+
123
+
124
+
125
+
126
+
127
+
128
+ <span class="summary_desc">Returns a new instance of Episode, mapping info from the TVRage API.</span>
129
+
130
+ </li>
131
+
132
+
133
+ </ul>
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ <h3 class="inherited">Methods included from <a title="Sofa::Mapping" href="../Mapping.html">Sofa::Mapping</a></h3>
142
+ <p class="inherited"><a title="included" href="../Mapping.html#included-class_method">included</a></p>
143
+ <div id="constructor_details">
144
+ <h2>Constructor Details</h2>
145
+
146
+ <div class="method_details first">
147
+ <p class="signature first" id="initialize-instance_method">
148
+
149
+ - (<tt><a title="Episode" href="">Episode</a></tt>) <strong>initialize</strong>(info)
150
+
151
+
152
+
153
+ </p><div class="docstring">
154
+ <div class="discussion">
155
+ <p>Returns a new instance of Episode, mapping info from the TVRage API</p>
156
+
157
+ </div>
158
+ </div>
159
+ <div class="tags">
160
+ <h3>Parameters:</h3>
161
+ <ul class="param">
162
+
163
+ <li>
164
+
165
+ <span class='type'>(<tt>Hash&lt;Symbol, Object&gt;</tt>)</span>
166
+
167
+
168
+ <span class='name'>info</span>
169
+
170
+
171
+
172
+ &mdash;
173
+ Info to initialize with
174
+
175
+ </li>
176
+
177
+ </ul>
178
+
179
+
180
+
181
+
182
+ <h3>Options Hash (<tt>info</tt>):</h3>
183
+ <ul class="option">
184
+
185
+ <li>
186
+ <span class="type">(<tt>String</tt>)</span>
187
+ <span class="name">:epnum</span>
188
+ <span class="default">
189
+
190
+ <span class="na">N/A</span>
191
+
192
+ </span>
193
+ &mdash;The episode number in the context of all episodes
194
+ </tr>
195
+
196
+ <li>
197
+ <span class="type">(<tt>String</tt>)</span>
198
+ <span class="name">:seasonnum</span>
199
+ <span class="default">
200
+
201
+ <span class="na">N/A</span>
202
+
203
+ </span>
204
+ &mdash;The episode number in the context of its season
205
+ </tr>
206
+
207
+ <li>
208
+ <span class="type">(<tt>String</tt>)</span>
209
+ <span class="name">:prodnum</span>
210
+ <span class="default">
211
+
212
+ <span class="na">N/A</span>
213
+
214
+ </span>
215
+
216
+ </tr>
217
+
218
+ <li>
219
+ <span class="type">(<tt>String</tt>)</span>
220
+ <span class="name">:airdate</span>
221
+ <span class="default">
222
+
223
+ <span class="na">N/A</span>
224
+
225
+ </span>
226
+ &mdash;The date the episode airs
227
+ </tr>
228
+
229
+ <li>
230
+ <span class="type">(<tt>String</tt>)</span>
231
+ <span class="name">:link</span>
232
+ <span class="default">
233
+
234
+ <span class="na">N/A</span>
235
+
236
+ </span>
237
+ &mdash;The TVRage page for this Episode
238
+ </tr>
239
+
240
+ <li>
241
+ <span class="type">(<tt>String</tt>)</span>
242
+ <span class="name">:title</span>
243
+ <span class="default">
244
+
245
+ <span class="na">N/A</span>
246
+
247
+ </span>
248
+ &mdash;The title of this Episode
249
+ </tr>
250
+
251
+ <li>
252
+ <span class="type">(<tt>String</tt>)</span>
253
+ <span class="name">:season_num</span>
254
+ <span class="default">
255
+
256
+ <span class="na">N/A</span>
257
+
258
+ </span>
259
+ &mdash;The season number of the Season this Episode belongs to
260
+ </tr>
261
+
262
+ </ul>
263
+
264
+ <h3>Returns:</h3>
265
+ <ul class="return">
266
+
267
+ <li>
268
+
269
+ <span class='type'>(<tt><a title="Episode" href="">Episode</a></tt>)</span>
270
+
271
+
272
+
273
+
274
+ &mdash;
275
+ a new instance of +Episode+
276
+
277
+ </li>
278
+
279
+ </ul>
280
+
281
+ </div><table class="source_code">
282
+ <tr>
283
+ <td>
284
+ <pre class="lines">
285
+
286
+
287
+ 34
288
+ 35
289
+ 36</pre>
290
+ </td>
291
+ <td>
292
+ <pre class="code"><span class="info file"># File 'lib/sofa/tvrage/episode.rb', line 34</span>
293
+
294
+ def initialize(info)
295
+ update_with_mapping(info)
296
+ end</pre>
297
+ </td>
298
+ </tr>
299
+ </table>
300
+ </div>
301
+
302
+ </div>
303
+
304
+ <div id="attr_details">
305
+ <h2>Attribute Details</h2>
306
+
307
+
308
+ <span id=""></span>
309
+ <span id="season_num-instance_method"></span>
310
+ <div class="method_details first">
311
+ <p class="signature first" id="season_num-instance_method">
312
+
313
+ - (<tt>Object</tt>) <strong>season_num</strong> <span class="extras">(readonly)</span>
314
+
315
+
316
+
317
+ </p><div class="docstring">
318
+ <div class="discussion">
319
+ <p>The season number of the Season this Episode belongs to. Not actually a part of the TVRage API, but it&#8217;s used to inject the +season_num+ when looping through Episodes in a Season.</p>
320
+
321
+ </div>
322
+ </div>
323
+ <div class="tags">
324
+
325
+ </div><table class="source_code">
326
+ <tr>
327
+ <td>
328
+ <pre class="lines">
329
+
330
+
331
+ 22
332
+ 23
333
+ 24</pre>
334
+ </td>
335
+ <td>
336
+ <pre class="code"><span class="info file"># File 'lib/sofa/tvrage/episode.rb', line 22</span>
337
+
338
+ def season_num
339
+ @season_num
340
+ end</pre>
341
+ </td>
342
+ </tr>
343
+ </table>
344
+ </div>
345
+
346
+ </div>
347
+
348
+
349
+ </div>
350
+
351
+ <div id="footer">
352
+ Generated on Sat Nov 21 20:13:53 2009 by
353
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
354
+ 0.4.0 (ruby-1.8.7).
355
+ </div>
356
+
357
+ </body>
358
+ </html>