repository-base 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +15 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +27 -0
  5. data/.travis.yml +6 -0
  6. data/.yardopts +1 -0
  7. data/CHANGELOG.md +128 -0
  8. data/Gemfile +4 -0
  9. data/LICENSE +22 -0
  10. data/README.md +132 -0
  11. data/Rakefile +33 -0
  12. data/bin/bundle +105 -0
  13. data/bin/htmldiff +29 -0
  14. data/bin/kramdown +29 -0
  15. data/bin/ldiff +29 -0
  16. data/bin/rake +29 -0
  17. data/bin/rspec +29 -0
  18. data/bin/rubocop +29 -0
  19. data/bin/ruby-parse +29 -0
  20. data/bin/ruby-rewrite +29 -0
  21. data/bin/setup +43 -0
  22. data/bin/yard +29 -0
  23. data/bin/yardoc +29 -0
  24. data/bin/yri +29 -0
  25. data/doc/Repository.html +128 -0
  26. data/doc/Repository/Base.html +1248 -0
  27. data/doc/Repository/Base/Internals.html +133 -0
  28. data/doc/Repository/Base/Internals/RecordDeleter.html +687 -0
  29. data/doc/Repository/Base/Internals/RecordSaver.html +816 -0
  30. data/doc/Repository/Base/Internals/RecordUpdater.html +1026 -0
  31. data/doc/Repository/Base/Internals/SlugFinder.html +986 -0
  32. data/doc/_index.html +176 -0
  33. data/doc/class_list.html +51 -0
  34. data/doc/css/common.css +1 -0
  35. data/doc/css/full_list.css +58 -0
  36. data/doc/css/style.css +499 -0
  37. data/doc/file.CHANGELOG.html +240 -0
  38. data/doc/file.README.html +218 -0
  39. data/doc/file_list.html +61 -0
  40. data/doc/frames.html +17 -0
  41. data/doc/index.html +218 -0
  42. data/doc/js/app.js +248 -0
  43. data/doc/js/full_list.js +216 -0
  44. data/doc/js/jquery.js +4 -0
  45. data/doc/method_list.html +363 -0
  46. data/doc/top-level-namespace.html +110 -0
  47. data/lib/repository/base.rb +115 -0
  48. data/lib/repository/base/internals/internals.rb +6 -0
  49. data/lib/repository/base/internals/record_deleter.rb +46 -0
  50. data/lib/repository/base/internals/record_saver.rb +58 -0
  51. data/lib/repository/base/internals/record_updater.rb +54 -0
  52. data/lib/repository/base/internals/slug_finder.rb +70 -0
  53. data/lib/repository/base/version.rb +12 -0
  54. data/repository-base.gemspec +37 -0
  55. data/spec/repository/base_spec.rb +398 -0
  56. data/spec/spec_helper.rb +14 -0
  57. metadata +281 -0
@@ -0,0 +1,1026 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Repository::Base::Internals::RecordUpdater
8
+
9
+ &mdash; Documentation by YARD 0.9.12
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "Repository::Base::Internals::RecordUpdater";
19
+ relpath = '../../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../../_index.html">Index (R)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../../Repository.html" title="Repository (module)">Repository</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Base.html" title="Repository::Base (class)">Base</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Internals.html" title="Repository::Base::Internals (module)">Internals</a></span></span>
41
+ &raquo;
42
+ <span class="title">RecordUpdater</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Repository::Base::Internals::RecordUpdater
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">Repository::Base::Internals::RecordUpdater</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+ <dl>
91
+ <dt>Includes:</dt>
92
+ <dd>Support</dd>
93
+ </dl>
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <dl>
101
+ <dt>Defined in:</dt>
102
+ <dd>lib/repository/base/internals/record_updater.rb</dd>
103
+ </dl>
104
+
105
+ </div>
106
+
107
+ <h2>Overview</h2><div class="docstring">
108
+ <div class="discussion">
109
+
110
+ <p>Stows away details of reporting update success/failure.</p>
111
+
112
+
113
+ </div>
114
+ </div>
115
+ <div class="tags">
116
+
117
+ <p class="tag_title">Since:</p>
118
+ <ul class="since">
119
+
120
+ <li>
121
+
122
+
123
+
124
+
125
+
126
+ <div class='inline'>
127
+ <p>0.0.4</p>
128
+ </div>
129
+
130
+ </li>
131
+
132
+ </ul>
133
+
134
+ </div>
135
+
136
+
137
+
138
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
139
+ <ul class="summary">
140
+
141
+ <li class="private ">
142
+ <span class="summary_signature">
143
+
144
+ <a href="#dao-instance_method" title="#dao (instance method)">#<strong>dao</strong> &#x21d2; Object </a>
145
+
146
+
147
+
148
+ </span>
149
+
150
+
151
+
152
+
153
+ <span class="note title readonly">readonly</span>
154
+
155
+
156
+
157
+ <span class="note title private">private</span>
158
+
159
+
160
+
161
+
162
+
163
+ <span class="summary_desc"><div class='inline'></div></span>
164
+
165
+ </li>
166
+
167
+
168
+ <li class="private ">
169
+ <span class="summary_signature">
170
+
171
+ <a href="#factory-instance_method" title="#factory (instance method)">#<strong>factory</strong> &#x21d2; Object </a>
172
+
173
+
174
+
175
+ </span>
176
+
177
+
178
+
179
+
180
+ <span class="note title readonly">readonly</span>
181
+
182
+
183
+
184
+ <span class="note title private">private</span>
185
+
186
+
187
+
188
+
189
+
190
+ <span class="summary_desc"><div class='inline'></div></span>
191
+
192
+ </li>
193
+
194
+
195
+ <li class="private ">
196
+ <span class="summary_signature">
197
+
198
+ <a href="#identifier-instance_method" title="#identifier (instance method)">#<strong>identifier</strong> &#x21d2; Object </a>
199
+
200
+
201
+
202
+ </span>
203
+
204
+
205
+
206
+
207
+ <span class="note title readonly">readonly</span>
208
+
209
+
210
+
211
+ <span class="note title private">private</span>
212
+
213
+
214
+
215
+
216
+
217
+ <span class="summary_desc"><div class='inline'></div></span>
218
+
219
+ </li>
220
+
221
+
222
+ <li class="private ">
223
+ <span class="summary_signature">
224
+
225
+ <a href="#record-instance_method" title="#record (instance method)">#<strong>record</strong> &#x21d2; Object </a>
226
+
227
+
228
+
229
+ </span>
230
+
231
+
232
+
233
+
234
+ <span class="note title readonly">readonly</span>
235
+
236
+
237
+
238
+ <span class="note title private">private</span>
239
+
240
+
241
+
242
+
243
+
244
+ <span class="summary_desc"><div class='inline'></div></span>
245
+
246
+ </li>
247
+
248
+
249
+ <li class="private ">
250
+ <span class="summary_signature">
251
+
252
+ <a href="#updated_attrs-instance_method" title="#updated_attrs (instance method)">#<strong>updated_attrs</strong> &#x21d2; Object </a>
253
+
254
+
255
+
256
+ </span>
257
+
258
+
259
+
260
+
261
+ <span class="note title readonly">readonly</span>
262
+
263
+
264
+
265
+ <span class="note title private">private</span>
266
+
267
+
268
+
269
+
270
+
271
+ <span class="summary_desc"><div class='inline'></div></span>
272
+
273
+ </li>
274
+
275
+
276
+ </ul>
277
+
278
+
279
+
280
+
281
+
282
+ <h2>
283
+ Instance Method Summary
284
+ <small><a href="#" class="summary_toggle">collapse</a></small>
285
+ </h2>
286
+
287
+ <ul class="summary">
288
+
289
+ <li class="private ">
290
+ <span class="summary_signature">
291
+
292
+ <a href="#failed_result-instance_method" title="#failed_result (instance method)">#<strong>failed_result</strong> &#x21d2; Object </a>
293
+
294
+
295
+
296
+ </span>
297
+
298
+
299
+
300
+ <span class="note title private">private</span>
301
+
302
+
303
+
304
+
305
+
306
+ <span class="summary_desc"><div class='inline'>
307
+ <p>:nodoc:.</p>
308
+ </div></span>
309
+
310
+ </li>
311
+
312
+
313
+ <li class="public ">
314
+ <span class="summary_signature">
315
+
316
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(identifier:, updated_attrs:, dao:, factory:) &#x21d2; RecordUpdater </a>
317
+
318
+
319
+
320
+ </span>
321
+
322
+
323
+ <span class="note title constructor">constructor</span>
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+ <span class="summary_desc"><div class='inline'>
333
+ <p>Initializes a new instance of `RecordUpdater`.</p>
334
+ </div></span>
335
+
336
+ </li>
337
+
338
+
339
+ <li class="private ">
340
+ <span class="summary_signature">
341
+
342
+ <a href="#successful_result-instance_method" title="#successful_result (instance method)">#<strong>successful_result</strong> &#x21d2; Object </a>
343
+
344
+
345
+
346
+ </span>
347
+
348
+
349
+
350
+ <span class="note title private">private</span>
351
+
352
+
353
+
354
+
355
+
356
+ <span class="summary_desc"><div class='inline'>
357
+ <p>:nodoc:.</p>
358
+ </div></span>
359
+
360
+ </li>
361
+
362
+
363
+ <li class="public ">
364
+ <span class="summary_signature">
365
+
366
+ <a href="#update-instance_method" title="#update (instance method)">#<strong>update</strong> &#x21d2; Repository::Support::StoreResult </a>
367
+
368
+
369
+
370
+ </span>
371
+
372
+
373
+
374
+
375
+
376
+
377
+
378
+
379
+
380
+ <span class="summary_desc"><div class='inline'>
381
+ <p>Command-pattern method to update a record in the persistence layer, based
382
+ on the parameters sent to `#initialize`.</p>
383
+ </div></span>
384
+
385
+ </li>
386
+
387
+
388
+ </ul>
389
+
390
+
391
+
392
+ <div id="constructor_details" class="method_details_list">
393
+ <h2>Constructor Details</h2>
394
+
395
+ <div class="method_details first">
396
+ <h3 class="signature first" id="initialize-instance_method">
397
+
398
+ #<strong>initialize</strong>(identifier:, updated_attrs:, dao:, factory:) &#x21d2; <tt><span class='object_link'><a href="" title="Repository::Base::Internals::RecordUpdater (class)">RecordUpdater</a></span></tt>
399
+
400
+
401
+
402
+
403
+
404
+ </h3><div class="docstring">
405
+ <div class="discussion">
406
+
407
+ <p>Initializes a new instance of `RecordUpdater`.</p>
408
+
409
+
410
+ </div>
411
+ </div>
412
+ <div class="tags">
413
+ <p class="tag_title">Parameters:</p>
414
+ <ul class="param">
415
+
416
+ <li>
417
+
418
+ <span class='name'>identifier</span>
419
+
420
+
421
+ <span class='type'>(<tt>String</tt>)</span>
422
+
423
+
424
+
425
+ &mdash;
426
+ <div class='inline'>
427
+ <p>Slug uniquely identifying the record in the DAO to update</p>
428
+ </div>
429
+
430
+ </li>
431
+
432
+ <li>
433
+
434
+ <span class='name'>updated_attrs</span>
435
+
436
+
437
+ <span class='type'>(<tt>Hash</tt>)</span>
438
+
439
+
440
+
441
+ &mdash;
442
+ <div class='inline'>
443
+ <p>Attributes to be updated.</p>
444
+ </div>
445
+
446
+ </li>
447
+
448
+ <li>
449
+
450
+ <span class='name'>dao</span>
451
+
452
+
453
+ <span class='type'></span>
454
+
455
+
456
+
457
+ &mdash;
458
+ <div class='inline'>
459
+ <p>Data Access Object implements persistence without business logic.</p>
460
+ </div>
461
+
462
+ </li>
463
+
464
+ <li>
465
+
466
+ <span class='name'>factory</span>
467
+
468
+
469
+ <span class='type'></span>
470
+
471
+
472
+
473
+ &mdash;
474
+ <div class='inline'>
475
+ <p>Class whose `#create` method converts a DAO record to an entity.</p>
476
+ </div>
477
+
478
+ </li>
479
+
480
+ </ul>
481
+
482
+ <p class="tag_title">Since:</p>
483
+ <ul class="since">
484
+
485
+ <li>
486
+
487
+
488
+
489
+
490
+
491
+ <div class='inline'>
492
+ <p>0.0.4</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
+ 23
506
+ 24
507
+ 25
508
+ 26
509
+ 27
510
+ 28</pre>
511
+ </td>
512
+ <td>
513
+ <pre class="code"><span class="info file"># File 'lib/repository/base/internals/record_updater.rb', line 23</span>
514
+
515
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>identifier:</span><span class='comma'>,</span> <span class='label'>updated_attrs:</span><span class='comma'>,</span> <span class='label'>dao:</span><span class='comma'>,</span> <span class='label'>factory:</span><span class='rparen'>)</span>
516
+ <span class='ivar'>@identifier</span> <span class='op'>=</span> <span class='id identifier rubyid_identifier'>identifier</span>
517
+ <span class='ivar'>@updated_attrs</span> <span class='op'>=</span> <span class='id identifier rubyid_updated_attrs'>updated_attrs</span>
518
+ <span class='ivar'>@dao</span> <span class='op'>=</span> <span class='id identifier rubyid_dao'>dao</span>
519
+ <span class='ivar'>@factory</span> <span class='op'>=</span> <span class='id identifier rubyid_factory'>factory</span>
520
+ <span class='kw'>end</span></pre>
521
+ </td>
522
+ </tr>
523
+ </table>
524
+ </div>
525
+
526
+ </div>
527
+
528
+ <div id="instance_attr_details" class="attr_details">
529
+ <h2>Instance Attribute Details</h2>
530
+
531
+
532
+ <span id=""></span>
533
+ <div class="method_details first">
534
+ <h3 class="signature first" id="dao-instance_method">
535
+
536
+ #<strong>dao</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly, private)</span>
537
+
538
+
539
+
540
+
541
+
542
+ </h3><div class="docstring">
543
+ <div class="discussion">
544
+
545
+
546
+ </div>
547
+ </div>
548
+ <div class="tags">
549
+
550
+ <p class="tag_title">Since:</p>
551
+ <ul class="since">
552
+
553
+ <li>
554
+
555
+
556
+
557
+
558
+
559
+ <div class='inline'>
560
+ <p>0.0.4</p>
561
+ </div>
562
+
563
+ </li>
564
+
565
+ </ul>
566
+
567
+ </div><table class="source_code">
568
+ <tr>
569
+ <td>
570
+ <pre class="lines">
571
+
572
+
573
+ 41
574
+ 42
575
+ 43</pre>
576
+ </td>
577
+ <td>
578
+ <pre class="code"><span class="info file"># File 'lib/repository/base/internals/record_updater.rb', line 41</span>
579
+
580
+ <span class='kw'>def</span> <span class='id identifier rubyid_dao'>dao</span>
581
+ <span class='ivar'>@dao</span>
582
+ <span class='kw'>end</span></pre>
583
+ </td>
584
+ </tr>
585
+ </table>
586
+ </div>
587
+
588
+
589
+ <span id=""></span>
590
+ <div class="method_details ">
591
+ <h3 class="signature " id="factory-instance_method">
592
+
593
+ #<strong>factory</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly, private)</span>
594
+
595
+
596
+
597
+
598
+
599
+ </h3><div class="docstring">
600
+ <div class="discussion">
601
+
602
+
603
+ </div>
604
+ </div>
605
+ <div class="tags">
606
+
607
+ <p class="tag_title">Since:</p>
608
+ <ul class="since">
609
+
610
+ <li>
611
+
612
+
613
+
614
+
615
+
616
+ <div class='inline'>
617
+ <p>0.0.4</p>
618
+ </div>
619
+
620
+ </li>
621
+
622
+ </ul>
623
+
624
+ </div><table class="source_code">
625
+ <tr>
626
+ <td>
627
+ <pre class="lines">
628
+
629
+
630
+ 41
631
+ 42
632
+ 43</pre>
633
+ </td>
634
+ <td>
635
+ <pre class="code"><span class="info file"># File 'lib/repository/base/internals/record_updater.rb', line 41</span>
636
+
637
+ <span class='kw'>def</span> <span class='id identifier rubyid_factory'>factory</span>
638
+ <span class='ivar'>@factory</span>
639
+ <span class='kw'>end</span></pre>
640
+ </td>
641
+ </tr>
642
+ </table>
643
+ </div>
644
+
645
+
646
+ <span id=""></span>
647
+ <div class="method_details ">
648
+ <h3 class="signature " id="identifier-instance_method">
649
+
650
+ #<strong>identifier</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly, private)</span>
651
+
652
+
653
+
654
+
655
+
656
+ </h3><div class="docstring">
657
+ <div class="discussion">
658
+
659
+
660
+ </div>
661
+ </div>
662
+ <div class="tags">
663
+
664
+ <p class="tag_title">Since:</p>
665
+ <ul class="since">
666
+
667
+ <li>
668
+
669
+
670
+
671
+
672
+
673
+ <div class='inline'>
674
+ <p>0.0.4</p>
675
+ </div>
676
+
677
+ </li>
678
+
679
+ </ul>
680
+
681
+ </div><table class="source_code">
682
+ <tr>
683
+ <td>
684
+ <pre class="lines">
685
+
686
+
687
+ 41
688
+ 42
689
+ 43</pre>
690
+ </td>
691
+ <td>
692
+ <pre class="code"><span class="info file"># File 'lib/repository/base/internals/record_updater.rb', line 41</span>
693
+
694
+ <span class='kw'>def</span> <span class='id identifier rubyid_identifier'>identifier</span>
695
+ <span class='ivar'>@identifier</span>
696
+ <span class='kw'>end</span></pre>
697
+ </td>
698
+ </tr>
699
+ </table>
700
+ </div>
701
+
702
+
703
+ <span id=""></span>
704
+ <div class="method_details ">
705
+ <h3 class="signature " id="record-instance_method">
706
+
707
+ #<strong>record</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly, private)</span>
708
+
709
+
710
+
711
+
712
+
713
+ </h3><div class="docstring">
714
+ <div class="discussion">
715
+
716
+
717
+ </div>
718
+ </div>
719
+ <div class="tags">
720
+
721
+ <p class="tag_title">Since:</p>
722
+ <ul class="since">
723
+
724
+ <li>
725
+
726
+
727
+
728
+
729
+
730
+ <div class='inline'>
731
+ <p>0.0.4</p>
732
+ </div>
733
+
734
+ </li>
735
+
736
+ </ul>
737
+
738
+ </div><table class="source_code">
739
+ <tr>
740
+ <td>
741
+ <pre class="lines">
742
+
743
+
744
+ 41
745
+ 42
746
+ 43</pre>
747
+ </td>
748
+ <td>
749
+ <pre class="code"><span class="info file"># File 'lib/repository/base/internals/record_updater.rb', line 41</span>
750
+
751
+ <span class='kw'>def</span> <span class='id identifier rubyid_record'>record</span>
752
+ <span class='ivar'>@record</span>
753
+ <span class='kw'>end</span></pre>
754
+ </td>
755
+ </tr>
756
+ </table>
757
+ </div>
758
+
759
+
760
+ <span id=""></span>
761
+ <div class="method_details ">
762
+ <h3 class="signature " id="updated_attrs-instance_method">
763
+
764
+ #<strong>updated_attrs</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly, private)</span>
765
+
766
+
767
+
768
+
769
+
770
+ </h3><div class="docstring">
771
+ <div class="discussion">
772
+
773
+
774
+ </div>
775
+ </div>
776
+ <div class="tags">
777
+
778
+ <p class="tag_title">Since:</p>
779
+ <ul class="since">
780
+
781
+ <li>
782
+
783
+
784
+
785
+
786
+
787
+ <div class='inline'>
788
+ <p>0.0.4</p>
789
+ </div>
790
+
791
+ </li>
792
+
793
+ </ul>
794
+
795
+ </div><table class="source_code">
796
+ <tr>
797
+ <td>
798
+ <pre class="lines">
799
+
800
+
801
+ 41
802
+ 42
803
+ 43</pre>
804
+ </td>
805
+ <td>
806
+ <pre class="code"><span class="info file"># File 'lib/repository/base/internals/record_updater.rb', line 41</span>
807
+
808
+ <span class='kw'>def</span> <span class='id identifier rubyid_updated_attrs'>updated_attrs</span>
809
+ <span class='ivar'>@updated_attrs</span>
810
+ <span class='kw'>end</span></pre>
811
+ </td>
812
+ </tr>
813
+ </table>
814
+ </div>
815
+
816
+ </div>
817
+
818
+
819
+ <div id="instance_method_details" class="method_details_list">
820
+ <h2>Instance Method Details</h2>
821
+
822
+
823
+ <div class="method_details first">
824
+ <h3 class="signature first" id="failed_result-instance_method">
825
+
826
+ #<strong>failed_result</strong> &#x21d2; <tt>Object</tt> <span class="extras">(private)</span>
827
+
828
+
829
+
830
+
831
+
832
+ </h3><div class="docstring">
833
+ <div class="discussion">
834
+
835
+ <p>:nodoc:</p>
836
+
837
+
838
+ </div>
839
+ </div>
840
+ <div class="tags">
841
+
842
+ <p class="tag_title">Since:</p>
843
+ <ul class="since">
844
+
845
+ <li>
846
+
847
+
848
+
849
+
850
+
851
+ <div class='inline'>
852
+ <p>0.0.4</p>
853
+ </div>
854
+
855
+ </li>
856
+
857
+ </ul>
858
+
859
+ </div><table class="source_code">
860
+ <tr>
861
+ <td>
862
+ <pre class="lines">
863
+
864
+
865
+ 43
866
+ 44
867
+ 45</pre>
868
+ </td>
869
+ <td>
870
+ <pre class="code"><span class="info file"># File 'lib/repository/base/internals/record_updater.rb', line 43</span>
871
+
872
+ <span class='kw'>def</span> <span class='id identifier rubyid_failed_result'>failed_result</span> <span class='comment'># :nodoc:
873
+ </span> <span class='const'>StoreResult</span><span class='op'>::</span><span class='const'>Failure</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='id identifier rubyid_record'>record</span><span class='period'>.</span><span class='id identifier rubyid_errors'>errors</span>
874
+ <span class='kw'>end</span></pre>
875
+ </td>
876
+ </tr>
877
+ </table>
878
+ </div>
879
+
880
+ <div class="method_details ">
881
+ <h3 class="signature " id="successful_result-instance_method">
882
+
883
+ #<strong>successful_result</strong> &#x21d2; <tt>Object</tt> <span class="extras">(private)</span>
884
+
885
+
886
+
887
+
888
+
889
+ </h3><div class="docstring">
890
+ <div class="discussion">
891
+
892
+ <p>:nodoc:</p>
893
+
894
+
895
+ </div>
896
+ </div>
897
+ <div class="tags">
898
+
899
+ <p class="tag_title">Since:</p>
900
+ <ul class="since">
901
+
902
+ <li>
903
+
904
+
905
+
906
+
907
+
908
+ <div class='inline'>
909
+ <p>0.0.4</p>
910
+ </div>
911
+
912
+ </li>
913
+
914
+ </ul>
915
+
916
+ </div><table class="source_code">
917
+ <tr>
918
+ <td>
919
+ <pre class="lines">
920
+
921
+
922
+ 47
923
+ 48
924
+ 49
925
+ 50</pre>
926
+ </td>
927
+ <td>
928
+ <pre class="code"><span class="info file"># File 'lib/repository/base/internals/record_updater.rb', line 47</span>
929
+
930
+ <span class='kw'>def</span> <span class='id identifier rubyid_successful_result'>successful_result</span> <span class='comment'># :nodoc:
931
+ </span> <span class='id identifier rubyid_entity'>entity</span> <span class='op'>=</span> <span class='id identifier rubyid_factory'>factory</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span> <span class='id identifier rubyid_record'>record</span>
932
+ <span class='const'>StoreResult</span><span class='op'>::</span><span class='const'>Success</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='id identifier rubyid_entity'>entity</span>
933
+ <span class='kw'>end</span></pre>
934
+ </td>
935
+ </tr>
936
+ </table>
937
+ </div>
938
+
939
+ <div class="method_details ">
940
+ <h3 class="signature " id="update-instance_method">
941
+
942
+ #<strong>update</strong> &#x21d2; <tt>Repository::Support::StoreResult</tt>
943
+
944
+
945
+
946
+
947
+
948
+ </h3><div class="docstring">
949
+ <div class="discussion">
950
+
951
+ <p>Command-pattern method to update a record in the persistence layer, based
952
+ on the parameters sent to `#initialize`.</p>
953
+
954
+
955
+ </div>
956
+ </div>
957
+ <div class="tags">
958
+
959
+ <p class="tag_title">Returns:</p>
960
+ <ul class="return">
961
+
962
+ <li>
963
+
964
+
965
+ <span class='type'>(<tt>Repository::Support::StoreResult</tt>)</span>
966
+
967
+
968
+
969
+ </li>
970
+
971
+ </ul>
972
+ <p class="tag_title">Since:</p>
973
+ <ul class="since">
974
+
975
+ <li>
976
+
977
+
978
+
979
+
980
+
981
+ <div class='inline'>
982
+ <p>0.0.4</p>
983
+ </div>
984
+
985
+ </li>
986
+
987
+ </ul>
988
+
989
+ </div><table class="source_code">
990
+ <tr>
991
+ <td>
992
+ <pre class="lines">
993
+
994
+
995
+ 33
996
+ 34
997
+ 35
998
+ 36
999
+ 37</pre>
1000
+ </td>
1001
+ <td>
1002
+ <pre class="code"><span class="info file"># File 'lib/repository/base/internals/record_updater.rb', line 33</span>
1003
+
1004
+ <span class='kw'>def</span> <span class='id identifier rubyid_update'>update</span>
1005
+ <span class='ivar'>@record</span> <span class='op'>=</span> <span class='id identifier rubyid_dao'>dao</span><span class='period'>.</span><span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='label'>slug:</span> <span class='id identifier rubyid_identifier'>identifier</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
1006
+ <span class='kw'>return</span> <span class='id identifier rubyid_failed_result'>failed_result</span> <span class='kw'>unless</span> <span class='ivar'>@record</span><span class='period'>.</span><span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span><span class='id identifier rubyid_updated_attrs'>updated_attrs</span><span class='period'>.</span><span class='id identifier rubyid_to_h'>to_h</span><span class='rparen'>)</span>
1007
+ <span class='id identifier rubyid_successful_result'>successful_result</span>
1008
+ <span class='kw'>end</span></pre>
1009
+ </td>
1010
+ </tr>
1011
+ </table>
1012
+ </div>
1013
+
1014
+ </div>
1015
+
1016
+ </div>
1017
+
1018
+ <div id="footer">
1019
+ Generated on Sat Feb 3 03:00:18 2018 by
1020
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1021
+ 0.9.12 (ruby-2.5.0).
1022
+ </div>
1023
+
1024
+ </div>
1025
+ </body>
1026
+ </html>