temporal_object 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,7 @@
1
+ *.gem
2
+ .bundle
3
+ pkg/*
4
+ .idea/*
5
+ .yardoc/
6
+ .rbenv-version
7
+ *~
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in temporal_object.gemspec
4
+
5
+ gemspec
6
+
data/Gemfile.lock ADDED
@@ -0,0 +1,26 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ temporal_object (0.0.2)
5
+ time_span
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ diff-lcs (1.1.3)
11
+ rspec (2.8.0)
12
+ rspec-core (~> 2.8.0)
13
+ rspec-expectations (~> 2.8.0)
14
+ rspec-mocks (~> 2.8.0)
15
+ rspec-core (2.8.0)
16
+ rspec-expectations (2.8.0)
17
+ diff-lcs (~> 1.1.2)
18
+ rspec-mocks (2.8.0)
19
+ time_span (0.0.3)
20
+
21
+ PLATFORMS
22
+ ruby
23
+
24
+ DEPENDENCIES
25
+ rspec
26
+ temporal_object!
data/README.md ADDED
@@ -0,0 +1,9 @@
1
+ Temporal Object
2
+ ===============
3
+
4
+ This is a first stab at creating a RubyGem to implement Martin Fowler's "Temporal Objects" paradigm.
5
+
6
+ So far there are time comparators. TemporalObject::RelativeTime just inherits from DateTime (for now).
7
+
8
+ IT IS NOT YET READY FOR PRIME TIME! Do not use. I will be refactoring, so the API *will* be changing. Thanks.
9
+
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,147 @@
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
+ Module: TemporalObject
8
+
9
+ &mdash; Documentation by YARD 0.7.5
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
+ relpath = '';
19
+ if (relpath != '') relpath += '/';
20
+ </script>
21
+
22
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
25
+
26
+
27
+ </head>
28
+ <body>
29
+ <script type="text/javascript" charset="utf-8">
30
+ if (window.top.frames.main) document.body.className = 'frames';
31
+ </script>
32
+
33
+ <div id="header">
34
+ <div id="menu">
35
+
36
+ <a href="_index.html">Index (T)</a> &raquo;
37
+
38
+
39
+ <span class="title">TemporalObject</span>
40
+
41
+
42
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
+ </div>
44
+
45
+ <div id="search">
46
+
47
+ <a id="class_list_link" href="#">Class List</a>
48
+
49
+ <a id="method_list_link" href="#">Method List</a>
50
+
51
+ <a id="file_list_link" href="#">File List</a>
52
+
53
+ </div>
54
+ <div class="clear"></div>
55
+ </div>
56
+
57
+ <iframe id="search_frame"></iframe>
58
+
59
+ <div id="content"><h1>Module: TemporalObject
60
+
61
+
62
+
63
+ </h1>
64
+
65
+ <dl class="box">
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+ <dt class="r1 last">Defined in:</dt>
75
+ <dd class="r1 last">lib/temporal_object.rb<span class="defines">,<br />
76
+ lib/temporal_object/version.rb</span>
77
+ </dd>
78
+
79
+ </dl>
80
+ <div class="clear"></div>
81
+
82
+ <h2>Overview</h2><div class="docstring">
83
+ <div class="discussion">
84
+
85
+
86
+ </div>
87
+ </div>
88
+ <div class="tags">
89
+
90
+ <h3>Author:</h3>
91
+ <ul class="author">
92
+
93
+ <li>
94
+
95
+
96
+
97
+
98
+
99
+ <div class='inline'>
100
+ <p>Craig A. Cook</p>
101
+ </div>
102
+
103
+ </li>
104
+
105
+ </ul>
106
+
107
+ </div><h2>Defined Under Namespace</h2>
108
+ <p class="children">
109
+
110
+
111
+
112
+
113
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="TemporalObject/TemporalObject.html" title="TemporalObject::TemporalObject (class)">TemporalObject</a></span>
114
+
115
+
116
+ </p>
117
+
118
+ <h2>Constant Summary</h2>
119
+
120
+ <dl class="constants">
121
+
122
+ <dt id="VERSION-constant" class="">VERSION =
123
+
124
+ </dt>
125
+ <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>
126
+
127
+ </dl>
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+ </div>
139
+
140
+ <div id="footer">
141
+ Generated on Mon Mar 5 16:14:00 2012 by
142
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
143
+ 0.7.5 (ruby-1.9.3).
144
+ </div>
145
+
146
+ </body>
147
+ </html>
@@ -0,0 +1,808 @@
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: TemporalObject::TemporalObject
8
+
9
+ &mdash; Documentation by YARD 0.7.5
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
+ relpath = '..';
19
+ if (relpath != '') relpath += '/';
20
+ </script>
21
+
22
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
25
+
26
+
27
+ </head>
28
+ <body>
29
+ <script type="text/javascript" charset="utf-8">
30
+ if (window.top.frames.main) document.body.className = 'frames';
31
+ </script>
32
+
33
+ <div id="header">
34
+ <div id="menu">
35
+
36
+ <a href="../_index.html">Index (T)</a> &raquo;
37
+ <span class='title'><span class='object_link'><a href="../TemporalObject.html" title="TemporalObject (module)">TemporalObject</a></span></span>
38
+ &raquo;
39
+ <span class="title">TemporalObject</span>
40
+
41
+
42
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
+ </div>
44
+
45
+ <div id="search">
46
+
47
+ <a id="class_list_link" href="#">Class List</a>
48
+
49
+ <a id="method_list_link" href="#">Method List</a>
50
+
51
+ <a id="file_list_link" href="#">File List</a>
52
+
53
+ </div>
54
+ <div class="clear"></div>
55
+ </div>
56
+
57
+ <iframe id="search_frame"></iframe>
58
+
59
+ <div id="content"><h1>Class: TemporalObject::TemporalObject
60
+
61
+
62
+
63
+ </h1>
64
+
65
+ <dl class="box">
66
+
67
+ <dt class="r1">Inherits:</dt>
68
+ <dd class="r1">
69
+ <span class="inheritName">Object</span>
70
+
71
+ <ul class="fullTree">
72
+ <li>Object</li>
73
+
74
+ <li class="next">TemporalObject::TemporalObject</li>
75
+
76
+ </ul>
77
+ <a href="#" class="inheritanceTree">show all</a>
78
+
79
+ </dd>
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+ <dt class="r2 last">Defined in:</dt>
90
+ <dd class="r2 last">lib/temporal_object.rb</dd>
91
+
92
+ </dl>
93
+ <div class="clear"></div>
94
+
95
+ <h2>Overview</h2><div class="docstring">
96
+ <div class="discussion">
97
+
98
+
99
+ </div>
100
+ </div>
101
+ <div class="tags">
102
+
103
+ <h3>Author:</h3>
104
+ <ul class="author">
105
+
106
+ <li>
107
+
108
+
109
+
110
+
111
+
112
+ <div class='inline'>
113
+ <p>Craig A. Cook</p>
114
+ </div>
115
+
116
+ </li>
117
+
118
+ </ul>
119
+
120
+ </div>
121
+
122
+
123
+
124
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
125
+ <ul class="summary">
126
+
127
+ <li class="public ">
128
+ <span class="summary_signature">
129
+
130
+ <a href="#name-instance_method" title="#name (instance method)">- (Object) <strong>name</strong> </a>
131
+
132
+
133
+
134
+ </span>
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+ <span class="summary_desc"><div class='inline'><dl class="rdoc-list"><dt>String</dt>
147
+ <dd>
148
+ <p>object human readable identifier.</p>
149
+ </dd></dl>
150
+ </div></span>
151
+
152
+ </li>
153
+
154
+
155
+ <li class="public ">
156
+ <span class="summary_signature">
157
+
158
+ <a href="#reference_object-instance_method" title="#reference_object (instance method)">- (Object) <strong>reference_object</strong> </a>
159
+
160
+
161
+
162
+ </span>
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+ <span class="summary_desc"><div class='inline'><dl class="rdoc-list"><dt>Object</dt>
175
+ <dd>
176
+ <p>associated Ruby Object of any kind.</p>
177
+ </dd></dl>
178
+ </div></span>
179
+
180
+ </li>
181
+
182
+
183
+ <li class="public ">
184
+ <span class="summary_signature">
185
+
186
+ <a href="#statuses-instance_method" title="#statuses (instance method)">- (Object) <strong>statuses</strong> </a>
187
+
188
+
189
+
190
+ </span>
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+ <span class="summary_desc"><div class='inline'><dl class="rdoc-list"><dt>Array</dt>
203
+ <dd>
204
+ <p>of TimeSpan::TimeLine statuses for temporal attributes.</p>
205
+ </dd></dl>
206
+ </div></span>
207
+
208
+ </li>
209
+
210
+
211
+ </ul>
212
+
213
+
214
+
215
+
216
+
217
+ <h2>
218
+ Instance Method Summary
219
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
220
+ </h2>
221
+
222
+ <ul class="summary">
223
+
224
+ <li class="public ">
225
+ <span class="summary_signature">
226
+
227
+ <a href="#add_timeline-instance_method" title="#add_timeline (instance method)">- (Array) <strong>add_timeline</strong>(timeline) </a>
228
+
229
+
230
+
231
+ </span>
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+ <span class="summary_desc"><div class='inline'>
241
+ <p>add a timeline to the TemporalObject.</p>
242
+ </div></span>
243
+
244
+ </li>
245
+
246
+
247
+ <li class="public ">
248
+ <span class="summary_signature">
249
+
250
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (TemporalObject) <strong>initialize</strong>(nom = &quot;&quot;, reference_obj = Object.new) </a>
251
+
252
+
253
+
254
+ </span>
255
+
256
+ <span class="note title constructor">constructor</span>
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+ <span class="summary_desc"><div class='inline'>
266
+ <p>A new instance of TemporalObject.</p>
267
+ </div></span>
268
+
269
+ </li>
270
+
271
+
272
+ <li class="public ">
273
+ <span class="summary_signature">
274
+
275
+ <a href="#remove_timeline-instance_method" title="#remove_timeline (instance method)">- (TimeSpan::TimeLine<sup>?</sup>) <strong>remove_timeline</strong>(timeline) </a>
276
+
277
+
278
+
279
+ </span>
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+ <span class="summary_desc"><div class='inline'>
289
+ <p>delete the cited timeline.</p>
290
+ </div></span>
291
+
292
+ </li>
293
+
294
+
295
+ <li class="public ">
296
+ <span class="summary_signature">
297
+
298
+ <a href="#remove_timelines-instance_method" title="#remove_timelines (instance method)">- (Array) <strong>remove_timelines</strong> </a>
299
+
300
+
301
+
302
+ </span>
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+ <span class="summary_desc"><div class='inline'>
312
+ <p>remove all TimeLine s from the TemporalObject.</p>
313
+ </div></span>
314
+
315
+ </li>
316
+
317
+
318
+ </ul>
319
+
320
+
321
+ <div id="constructor_details" class="method_details_list">
322
+ <h2>Constructor Details</h2>
323
+
324
+ <div class="method_details first">
325
+ <p class="signature first" id="initialize-instance_method">
326
+
327
+ - (<tt><span class='object_link'><a href="" title="TemporalObject::TemporalObject (class)">TemporalObject</a></span></tt>) <strong>initialize</strong>(nom = &quot;&quot;, reference_obj = Object.new)
328
+
329
+
330
+
331
+ </p><div class="docstring">
332
+ <div class="discussion">
333
+
334
+ <p>A new instance of TemporalObject</p>
335
+
336
+
337
+ </div>
338
+ </div>
339
+ <div class="tags">
340
+ <h3>Parameters:</h3>
341
+ <ul class="param">
342
+
343
+ <li>
344
+
345
+ <span class='name'>nom</span>
346
+
347
+
348
+ <span class='type'>(<tt>String</tt>)</span>
349
+
350
+
351
+ <em class="default">(defaults to: <tt>&quot;&quot;</tt>)</em>
352
+
353
+
354
+ &mdash;
355
+ <div class='inline'>
356
+ <p>is the TemporalObject's name</p>
357
+ </div>
358
+
359
+ </li>
360
+
361
+ <li>
362
+
363
+ <span class='name'>reference_obj</span>
364
+
365
+
366
+ <span class='type'>(<tt>Object</tt>)</span>
367
+
368
+
369
+ <em class="default">(defaults to: <tt>Object.new</tt>)</em>
370
+
371
+
372
+ &mdash;
373
+ <div class='inline'>
374
+ <p>is the object associated with this TemporalObject</p>
375
+ </div>
376
+
377
+ </li>
378
+
379
+ </ul>
380
+
381
+
382
+ </div><table class="source_code">
383
+ <tr>
384
+ <td>
385
+ <pre class="lines">
386
+
387
+
388
+ 26
389
+ 27
390
+ 28
391
+ 29
392
+ 30</pre>
393
+ </td>
394
+ <td>
395
+ <pre class="code"><span class="info file"># File 'lib/temporal_object.rb', line 26</span>
396
+
397
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_nom'>nom</span><span class='op'>=</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_reference_obj'>reference_obj</span><span class='op'>=</span><span class='const'>Object</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='rparen'>)</span>
398
+ <span class='ivar'>@statuses</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='comment'># Array of TimeSpan::TimeLine
399
+ </span> <span class='ivar'>@name</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span>
400
+ <span class='ivar'>@reference_object</span> <span class='op'>=</span> <span class='id identifier rubyid_reference_obj'>reference_obj</span>
401
+ <span class='kw'>end</span></pre>
402
+ </td>
403
+ </tr>
404
+ </table>
405
+ </div>
406
+
407
+ </div>
408
+
409
+ <div id="instance_attr_details" class="attr_details">
410
+ <h2>Instance Attribute Details</h2>
411
+
412
+
413
+ <span id="name=-instance_method"></span>
414
+ <span id="name-instance_method"></span>
415
+ <div class="method_details first">
416
+ <p class="signature first" id="name-instance_method">
417
+
418
+ - (<tt>Object</tt>) <strong>name</strong>
419
+
420
+
421
+
422
+ </p><div class="docstring">
423
+ <div class="discussion">
424
+ <dl class="rdoc-list"><dt>String</dt>
425
+ <dd>
426
+ <p>object human readable identifier</p>
427
+ </dd></dl>
428
+
429
+
430
+ </div>
431
+ </div>
432
+ <div class="tags">
433
+
434
+
435
+ </div><table class="source_code">
436
+ <tr>
437
+ <td>
438
+ <pre class="lines">
439
+
440
+
441
+ 13
442
+ 14
443
+ 15</pre>
444
+ </td>
445
+ <td>
446
+ <pre class="code"><span class="info file"># File 'lib/temporal_object.rb', line 13</span>
447
+
448
+ <span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
449
+ <span class='ivar'>@name</span>
450
+ <span class='kw'>end</span></pre>
451
+ </td>
452
+ </tr>
453
+ </table>
454
+ </div>
455
+
456
+
457
+ <span id="reference_object=-instance_method"></span>
458
+ <span id="reference_object-instance_method"></span>
459
+ <div class="method_details ">
460
+ <p class="signature " id="reference_object-instance_method">
461
+
462
+ - (<tt>Object</tt>) <strong>reference_object</strong>
463
+
464
+
465
+
466
+ </p><div class="docstring">
467
+ <div class="discussion">
468
+ <dl class="rdoc-list"><dt>Object</dt>
469
+ <dd>
470
+ <p>associated Ruby Object of any kind</p>
471
+ </dd></dl>
472
+
473
+
474
+ </div>
475
+ </div>
476
+ <div class="tags">
477
+
478
+
479
+ </div><table class="source_code">
480
+ <tr>
481
+ <td>
482
+ <pre class="lines">
483
+
484
+
485
+ 15
486
+ 16
487
+ 17</pre>
488
+ </td>
489
+ <td>
490
+ <pre class="code"><span class="info file"># File 'lib/temporal_object.rb', line 15</span>
491
+
492
+ <span class='kw'>def</span> <span class='id identifier rubyid_reference_object'>reference_object</span>
493
+ <span class='ivar'>@reference_object</span>
494
+ <span class='kw'>end</span></pre>
495
+ </td>
496
+ </tr>
497
+ </table>
498
+ </div>
499
+
500
+
501
+ <span id="statuses=-instance_method"></span>
502
+ <span id="statuses-instance_method"></span>
503
+ <div class="method_details ">
504
+ <p class="signature " id="statuses-instance_method">
505
+
506
+ - (<tt>Object</tt>) <strong>statuses</strong>
507
+
508
+
509
+
510
+ </p><div class="docstring">
511
+ <div class="discussion">
512
+ <dl class="rdoc-list"><dt>Array</dt>
513
+ <dd>
514
+ <p>of TimeSpan::TimeLine statuses for temporal attributes</p>
515
+ </dd></dl>
516
+
517
+
518
+ </div>
519
+ </div>
520
+ <div class="tags">
521
+
522
+
523
+ </div><table class="source_code">
524
+ <tr>
525
+ <td>
526
+ <pre class="lines">
527
+
528
+
529
+ 11
530
+ 12
531
+ 13</pre>
532
+ </td>
533
+ <td>
534
+ <pre class="code"><span class="info file"># File 'lib/temporal_object.rb', line 11</span>
535
+
536
+ <span class='kw'>def</span> <span class='id identifier rubyid_statuses'>statuses</span>
537
+ <span class='ivar'>@statuses</span>
538
+ <span class='kw'>end</span></pre>
539
+ </td>
540
+ </tr>
541
+ </table>
542
+ </div>
543
+
544
+ </div>
545
+
546
+
547
+ <div id="instance_method_details" class="method_details_list">
548
+ <h2>Instance Method Details</h2>
549
+
550
+
551
+ <div class="method_details first">
552
+ <p class="signature first" id="add_timeline-instance_method">
553
+
554
+ - (<tt>Array</tt>) <strong>add_timeline</strong>(timeline)
555
+
556
+
557
+
558
+ </p><div class="docstring">
559
+ <div class="discussion">
560
+
561
+ <p>add a timeline to the TemporalObject</p>
562
+
563
+
564
+ </div>
565
+ </div>
566
+ <div class="tags">
567
+ <h3>Parameters:</h3>
568
+ <ul class="param">
569
+
570
+ <li>
571
+
572
+ <span class='name'>timeline</span>
573
+
574
+
575
+ <span class='type'>(<tt>TimeSpan::TimeLine</tt>)</span>
576
+
577
+
578
+
579
+ &mdash;
580
+ <div class='inline'>
581
+ <p>added to the object</p>
582
+ </div>
583
+
584
+ </li>
585
+
586
+ </ul>
587
+
588
+ <h3>Returns:</h3>
589
+ <ul class="return">
590
+
591
+ <li>
592
+
593
+
594
+ <span class='type'>(<tt>Array</tt>)</span>
595
+
596
+
597
+
598
+ &mdash;
599
+ <div class='inline'>
600
+ <p>adjusted list of timelines if no exception raised.</p>
601
+ </div>
602
+
603
+ </li>
604
+
605
+ </ul>
606
+ <h3>Raises:</h3>
607
+ <ul class="raise">
608
+
609
+ <li>
610
+
611
+
612
+ <span class='type'>(<tt>ArgumentError</tt>)</span>
613
+
614
+
615
+
616
+ </li>
617
+
618
+ </ul>
619
+
620
+ </div><table class="source_code">
621
+ <tr>
622
+ <td>
623
+ <pre class="lines">
624
+
625
+
626
+ 35
627
+ 36
628
+ 37
629
+ 38</pre>
630
+ </td>
631
+ <td>
632
+ <pre class="code"><span class="info file"># File 'lib/temporal_object.rb', line 35</span>
633
+
634
+ <span class='kw'>def</span> <span class='id identifier rubyid_add_timeline'>add_timeline</span><span class='lparen'>(</span><span class='id identifier rubyid_timeline'>timeline</span><span class='rparen'>)</span>
635
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Can only add a TimeSpan::TimeLine to a TemporalObject's statuses</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_timeline'>timeline</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span> <span class='const'>TimeSpan</span><span class='op'>::</span><span class='const'>TimeLine</span>
636
+ <span class='ivar'>@statuses</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_timeline'>timeline</span>
637
+ <span class='kw'>end</span></pre>
638
+ </td>
639
+ </tr>
640
+ </table>
641
+ </div>
642
+
643
+ <div class="method_details ">
644
+ <p class="signature " id="remove_timeline-instance_method">
645
+
646
+ - (<tt>TimeSpan::TimeLine</tt><sup>?</sup>) <strong>remove_timeline</strong>(timeline)
647
+
648
+
649
+
650
+ </p><div class="docstring">
651
+ <div class="discussion">
652
+
653
+ <p>delete the cited timeline</p>
654
+
655
+
656
+ </div>
657
+ </div>
658
+ <div class="tags">
659
+ <h3>Parameters:</h3>
660
+ <ul class="param">
661
+
662
+ <li>
663
+
664
+ <span class='name'>timeline</span>
665
+
666
+
667
+ <span class='type'>(<tt>TimeSpan::TimeLine</tt>)</span>
668
+
669
+
670
+
671
+ &mdash;
672
+ <div class='inline'>
673
+ <p>timeline to delete</p>
674
+ </div>
675
+
676
+ </li>
677
+
678
+ </ul>
679
+
680
+ <h3>Returns:</h3>
681
+ <ul class="return">
682
+
683
+ <li>
684
+
685
+
686
+ <span class='type'>(<tt>TimeSpan::TimeLine</tt>, <tt>nil</tt>)</span>
687
+
688
+
689
+
690
+ &mdash;
691
+ <div class='inline'>
692
+ <p>TimeLIne deleted if successful or nil if not</p>
693
+ </div>
694
+
695
+ </li>
696
+
697
+ </ul>
698
+ <h3>Raises:</h3>
699
+ <ul class="raise">
700
+
701
+ <li>
702
+
703
+
704
+ <span class='type'></span>
705
+
706
+
707
+
708
+
709
+ <div class='inline'>
710
+ <p>ArgumentError if called with a non-TimeLine object</p>
711
+ </div>
712
+
713
+ </li>
714
+
715
+ </ul>
716
+
717
+ </div><table class="source_code">
718
+ <tr>
719
+ <td>
720
+ <pre class="lines">
721
+
722
+
723
+ 50
724
+ 51
725
+ 52
726
+ 53</pre>
727
+ </td>
728
+ <td>
729
+ <pre class="code"><span class="info file"># File 'lib/temporal_object.rb', line 50</span>
730
+
731
+ <span class='kw'>def</span> <span class='id identifier rubyid_remove_timeline'>remove_timeline</span><span class='lparen'>(</span><span class='id identifier rubyid_timeline'>timeline</span><span class='rparen'>)</span>
732
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Can only remove a TimeLine with this call.</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_timeline'>timeline</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span> <span class='const'>TimeSpan</span><span class='op'>::</span><span class='const'>TimeLine</span>
733
+ <span class='ivar'>@statuses</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_timeline'>timeline</span><span class='rparen'>)</span>
734
+ <span class='kw'>end</span></pre>
735
+ </td>
736
+ </tr>
737
+ </table>
738
+ </div>
739
+
740
+ <div class="method_details ">
741
+ <p class="signature " id="remove_timelines-instance_method">
742
+
743
+ - (<tt>Array</tt>) <strong>remove_timelines</strong>
744
+
745
+
746
+
747
+ </p><div class="docstring">
748
+ <div class="discussion">
749
+
750
+ <p>remove all TimeLine s from the TemporalObject</p>
751
+
752
+
753
+ </div>
754
+ </div>
755
+ <div class="tags">
756
+
757
+ <h3>Returns:</h3>
758
+ <ul class="return">
759
+
760
+ <li>
761
+
762
+
763
+ <span class='type'>(<tt>Array</tt>)</span>
764
+
765
+
766
+
767
+ &mdash;
768
+ <div class='inline'>
769
+ <p>the associated timelines</p>
770
+ </div>
771
+
772
+ </li>
773
+
774
+ </ul>
775
+
776
+ </div><table class="source_code">
777
+ <tr>
778
+ <td>
779
+ <pre class="lines">
780
+
781
+
782
+ 42
783
+ 43
784
+ 44</pre>
785
+ </td>
786
+ <td>
787
+ <pre class="code"><span class="info file"># File 'lib/temporal_object.rb', line 42</span>
788
+
789
+ <span class='kw'>def</span> <span class='id identifier rubyid_remove_timelines'>remove_timelines</span>
790
+ <span class='ivar'>@statuses</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
791
+ <span class='kw'>end</span></pre>
792
+ </td>
793
+ </tr>
794
+ </table>
795
+ </div>
796
+
797
+ </div>
798
+
799
+ </div>
800
+
801
+ <div id="footer">
802
+ Generated on Mon Mar 5 16:14:00 2012 by
803
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
804
+ 0.7.5 (ruby-1.9.3).
805
+ </div>
806
+
807
+ </body>
808
+ </html>