mangrove 0.4.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1108 @@
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: Mangrove::Option::Some
8
+
9
+ &mdash; Documentation by YARD 0.9.34
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Mangrove::Option::Some";
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 (S)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../Mangrove.html" title="Mangrove (module)">Mangrove</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Option.html" title="Mangrove::Option (module)">Option</a></span></span>
41
+ &raquo;
42
+ <span class="title">Some</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: Mangrove::Option::Some
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">Mangrove::Option::Some</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+ <dl>
89
+ <dt>Extended by:</dt>
90
+ <dd>T::Generic, T::Helpers, T::Sig</dd>
91
+ </dl>
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Includes:</dt>
97
+ <dd><span class='object_link'><a href="../Option.html" title="Mangrove::Option (module)">Mangrove::Option</a></span></dd>
98
+ </dl>
99
+
100
+
101
+
102
+
103
+
104
+
105
+ <dl>
106
+ <dt>Defined in:</dt>
107
+ <dd>lib/mangrove/option.rb</dd>
108
+ </dl>
109
+
110
+ </div>
111
+
112
+ <h2>Overview</h2><div class="docstring">
113
+ <div class="discussion">
114
+
115
+ <p>Option::Some</p>
116
+
117
+
118
+ </div>
119
+ </div>
120
+ <div class="tags">
121
+
122
+
123
+ </div>
124
+
125
+ <h2>
126
+ Constant Summary
127
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
128
+ </h2>
129
+
130
+ <dl class="constants">
131
+
132
+ <dt id="InnerType-constant" class="">InnerType =
133
+
134
+ </dt>
135
+ <dd><pre class="code"><span class='id identifier rubyid_type_member'>type_member</span></pre></dd>
136
+
137
+ </dl>
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+ <h2>
148
+ Instance Method Summary
149
+ <small><a href="#" class="summary_toggle">collapse</a></small>
150
+ </h2>
151
+
152
+ <ul class="summary">
153
+
154
+ <li class="public ">
155
+ <span class="summary_signature">
156
+
157
+ <a href="#==-instance_method" title="#== (instance method)">#<strong>==</strong>(other) &#x21d2; Boolean </a>
158
+
159
+
160
+
161
+ </span>
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ <span class="summary_desc"><div class='inline'></div></span>
172
+
173
+ </li>
174
+
175
+
176
+ <li class="public ">
177
+ <span class="summary_signature">
178
+
179
+ <a href="#expect!-instance_method" title="#expect! (instance method)">#<strong>expect!</strong>(_message) &#x21d2; InnerType </a>
180
+
181
+
182
+
183
+ </span>
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+ <span class="summary_desc"><div class='inline'></div></span>
194
+
195
+ </li>
196
+
197
+
198
+ <li class="public ">
199
+ <span class="summary_signature">
200
+
201
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(inner) &#x21d2; void </a>
202
+
203
+
204
+
205
+ </span>
206
+
207
+
208
+ <span class="note title constructor">constructor</span>
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+ <span class="summary_desc"><div class='inline'></div></span>
218
+
219
+ </li>
220
+
221
+
222
+ <li class="public ">
223
+ <span class="summary_signature">
224
+
225
+ <a href="#map_none-instance_method" title="#map_none (instance method)">#<strong>map_none</strong>(&amp;_block) &#x21d2; Option::Some[InnerType] </a>
226
+
227
+
228
+
229
+ </span>
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+ <span class="summary_desc"><div class='inline'></div></span>
240
+
241
+ </li>
242
+
243
+
244
+ <li class="public ">
245
+ <span class="summary_signature">
246
+
247
+ <a href="#map_some-instance_method" title="#map_some (instance method)">#<strong>map_some</strong>(&amp;block) &#x21d2; Option[InnerType] </a>
248
+
249
+
250
+
251
+ </span>
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+ <span class="summary_desc"><div class='inline'></div></span>
262
+
263
+ </li>
264
+
265
+
266
+ <li class="public ">
267
+ <span class="summary_signature">
268
+
269
+ <a href="#none%3F-instance_method" title="#none? (instance method)">#<strong>none?</strong> &#x21d2; Boolean </a>
270
+
271
+
272
+
273
+ </span>
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+ <span class="summary_desc"><div class='inline'></div></span>
284
+
285
+ </li>
286
+
287
+
288
+ <li class="public ">
289
+ <span class="summary_signature">
290
+
291
+ <a href="#some%3F-instance_method" title="#some? (instance method)">#<strong>some?</strong> &#x21d2; Boolean </a>
292
+
293
+
294
+
295
+ </span>
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+ <span class="summary_desc"><div class='inline'></div></span>
306
+
307
+ </li>
308
+
309
+
310
+ <li class="public ">
311
+ <span class="summary_signature">
312
+
313
+ <a href="#transpose-instance_method" title="#transpose (instance method)">#<strong>transpose</strong>(_err) &#x21d2; Mangrove::Result[InnerType, T.type_parameter(:ErrType)] </a>
314
+
315
+
316
+
317
+ </span>
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+ <span class="summary_desc"><div class='inline'></div></span>
328
+
329
+ </li>
330
+
331
+
332
+ <li class="public ">
333
+ <span class="summary_signature">
334
+
335
+ <a href="#unwrap-instance_method" title="#unwrap (instance method)">#<strong>unwrap</strong> &#x21d2; InnerType </a>
336
+
337
+
338
+
339
+ </span>
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+ <span class="summary_desc"><div class='inline'></div></span>
350
+
351
+ </li>
352
+
353
+
354
+ <li class="public ">
355
+ <span class="summary_signature">
356
+
357
+ <a href="#unwrap!-instance_method" title="#unwrap! (instance method)">#<strong>unwrap!</strong> &#x21d2; InnerType </a>
358
+
359
+
360
+
361
+ </span>
362
+
363
+
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+ <span class="summary_desc"><div class='inline'></div></span>
372
+
373
+ </li>
374
+
375
+
376
+ <li class="public ">
377
+ <span class="summary_signature">
378
+
379
+ <a href="#unwrap_or-instance_method" title="#unwrap_or (instance method)">#<strong>unwrap_or</strong>(_default) &#x21d2; InnerType </a>
380
+
381
+
382
+
383
+ </span>
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+
392
+
393
+ <span class="summary_desc"><div class='inline'></div></span>
394
+
395
+ </li>
396
+
397
+
398
+ </ul>
399
+
400
+
401
+
402
+
403
+
404
+
405
+
406
+
407
+
408
+
409
+
410
+
411
+
412
+
413
+
414
+ <div id="constructor_details" class="method_details_list">
415
+ <h2>Constructor Details</h2>
416
+
417
+ <div class="method_details first">
418
+ <h3 class="signature first" id="initialize-instance_method">
419
+
420
+ #<strong>initialize</strong>(inner) &#x21d2; <tt>void</tt>
421
+
422
+
423
+
424
+
425
+
426
+ </h3><div class="docstring">
427
+ <div class="discussion">
428
+
429
+
430
+ </div>
431
+ </div>
432
+ <div class="tags">
433
+ <p class="tag_title">Parameters:</p>
434
+ <ul class="param">
435
+
436
+ <li>
437
+
438
+ <span class='name'>inner</span>
439
+
440
+
441
+ <span class='type'>(<tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>)</span>
442
+
443
+
444
+
445
+ </li>
446
+
447
+ </ul>
448
+
449
+
450
+ </div><table class="source_code">
451
+ <tr>
452
+ <td>
453
+ <pre class="lines">
454
+
455
+
456
+ 32
457
+ 33
458
+ 34</pre>
459
+ </td>
460
+ <td>
461
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 32</span>
462
+
463
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_inner'>inner</span><span class='rparen'>)</span>
464
+ <span class='ivar'>@inner</span> <span class='op'>=</span> <span class='const'>T</span><span class='period'>.</span><span class='id identifier rubyid_let'>let</span><span class='lparen'>(</span><span class='id identifier rubyid_inner'>inner</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></span><span class='rparen'>)</span>
465
+ <span class='kw'>end</span></pre>
466
+ </td>
467
+ </tr>
468
+ </table>
469
+ </div>
470
+
471
+ </div>
472
+
473
+
474
+ <div id="instance_method_details" class="method_details_list">
475
+ <h2>Instance Method Details</h2>
476
+
477
+
478
+ <div class="method_details first">
479
+ <h3 class="signature first" id="==-instance_method">
480
+
481
+ #<strong>==</strong>(other) &#x21d2; <tt>Boolean</tt>
482
+
483
+
484
+
485
+
486
+
487
+ </h3><div class="docstring">
488
+ <div class="discussion">
489
+
490
+
491
+ </div>
492
+ </div>
493
+ <div class="tags">
494
+ <p class="tag_title">Parameters:</p>
495
+ <ul class="param">
496
+
497
+ <li>
498
+
499
+ <span class='name'>other</span>
500
+
501
+
502
+ <span class='type'>(<tt>BasicObject</tt>)</span>
503
+
504
+
505
+
506
+ </li>
507
+
508
+ </ul>
509
+
510
+ <p class="tag_title">Returns:</p>
511
+ <ul class="return">
512
+
513
+ <li>
514
+
515
+
516
+ <span class='type'>(<tt>Boolean</tt>)</span>
517
+
518
+
519
+
520
+ </li>
521
+
522
+ </ul>
523
+
524
+ </div><table class="source_code">
525
+ <tr>
526
+ <td>
527
+ <pre class="lines">
528
+
529
+
530
+ 37
531
+ 38
532
+ 39
533
+ 40
534
+ 41
535
+ 42
536
+ 43
537
+ 44
538
+ 45
539
+ 46
540
+ 47</pre>
541
+ </td>
542
+ <td>
543
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 37</span>
544
+
545
+ <span class='kw'>def</span> <span class='op'>==</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
546
+ <span class='kw'>case</span> <span class='id identifier rubyid_other'>other</span>
547
+ <span class='kw'>when</span> <span class='const'><span class='object_link'><a href="../Option.html" title="Mangrove::Option (module)">Option</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Mangrove::Option::Some (class)">Some</a></span></span>
548
+ <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_instance_variable_get'>instance_variable_get</span><span class='lparen'>(</span><span class='symbol'>:@inner</span><span class='rparen'>)</span> <span class='op'>==</span> <span class='ivar'>@inner</span>
549
+ <span class='kw'>when</span> <span class='const'><span class='object_link'><a href="../Option.html" title="Mangrove::Option (module)">Option</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="None.html" title="Mangrove::Option::None (class)">None</a></span></span>
550
+ <span class='kw'>false</span>
551
+ <span class='kw'>else</span>
552
+ <span class='comment'># T.absurd(other)
553
+ </span> <span class='kw'>false</span>
554
+ <span class='kw'>end</span>
555
+ <span class='kw'>end</span></pre>
556
+ </td>
557
+ </tr>
558
+ </table>
559
+ </div>
560
+
561
+ <div class="method_details ">
562
+ <h3 class="signature " id="expect!-instance_method">
563
+
564
+ #<strong>expect!</strong>(_message) &#x21d2; <tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>
565
+
566
+
567
+
568
+
569
+
570
+ </h3><div class="docstring">
571
+ <div class="discussion">
572
+
573
+
574
+ </div>
575
+ </div>
576
+ <div class="tags">
577
+ <p class="tag_title">Parameters:</p>
578
+ <ul class="param">
579
+
580
+ <li>
581
+
582
+ <span class='name'>_message</span>
583
+
584
+
585
+ <span class='type'>(<tt>String</tt>)</span>
586
+
587
+
588
+
589
+ </li>
590
+
591
+ </ul>
592
+
593
+ <p class="tag_title">Returns:</p>
594
+ <ul class="return">
595
+
596
+ <li>
597
+
598
+
599
+ <span class='type'>(<tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>)</span>
600
+
601
+
602
+
603
+ </li>
604
+
605
+ </ul>
606
+
607
+ </div><table class="source_code">
608
+ <tr>
609
+ <td>
610
+ <pre class="lines">
611
+
612
+
613
+ 65
614
+ 66
615
+ 67</pre>
616
+ </td>
617
+ <td>
618
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 65</span>
619
+
620
+ <span class='kw'>def</span> <span class='id identifier rubyid_expect!'>expect!</span><span class='lparen'>(</span><span class='id identifier rubyid__message'>_message</span><span class='rparen'>)</span>
621
+ <span class='ivar'>@inner</span>
622
+ <span class='kw'>end</span></pre>
623
+ </td>
624
+ </tr>
625
+ </table>
626
+ </div>
627
+
628
+ <div class="method_details ">
629
+ <h3 class="signature " id="map_none-instance_method">
630
+
631
+ #<strong>map_none</strong>(&amp;_block) &#x21d2; <tt><span class='object_link'><a href="" title="Mangrove::Option::Some (class)">Option::Some</a></span>[<span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span>]</tt>
632
+
633
+
634
+
635
+
636
+
637
+ </h3><div class="docstring">
638
+ <div class="discussion">
639
+
640
+
641
+ </div>
642
+ </div>
643
+ <div class="tags">
644
+ <p class="tag_title">Parameters:</p>
645
+ <ul class="param">
646
+
647
+ <li>
648
+
649
+ <span class='name'>_block</span>
650
+
651
+
652
+ <span class='type'>(<tt>T.proc.returns(<span class='object_link'><a href="../Option.html" title="Mangrove::Option (module)">Option</a></span>[<span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span>])</tt>)</span>
653
+
654
+
655
+
656
+ </li>
657
+
658
+ </ul>
659
+
660
+ <p class="tag_title">Returns:</p>
661
+ <ul class="return">
662
+
663
+ <li>
664
+
665
+
666
+ <span class='type'>(<tt><span class='object_link'><a href="" title="Mangrove::Option::Some (class)">Option::Some</a></span>[<span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span>]</tt>)</span>
667
+
668
+
669
+
670
+ </li>
671
+
672
+ </ul>
673
+
674
+ </div><table class="source_code">
675
+ <tr>
676
+ <td>
677
+ <pre class="lines">
678
+
679
+
680
+ 81
681
+ 82
682
+ 83</pre>
683
+ </td>
684
+ <td>
685
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 81</span>
686
+
687
+ <span class='kw'>def</span> <span class='id identifier rubyid_map_none'>map_none</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid__block'>_block</span><span class='rparen'>)</span>
688
+ <span class='kw'>self</span>
689
+ <span class='kw'>end</span></pre>
690
+ </td>
691
+ </tr>
692
+ </table>
693
+ </div>
694
+
695
+ <div class="method_details ">
696
+ <h3 class="signature " id="map_some-instance_method">
697
+
698
+ #<strong>map_some</strong>(&amp;block) &#x21d2; <tt><span class='object_link'><a href="../Option.html" title="Mangrove::Option (module)">Option</a></span>[<span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span>]</tt>
699
+
700
+
701
+
702
+
703
+
704
+ </h3><div class="docstring">
705
+ <div class="discussion">
706
+
707
+
708
+ </div>
709
+ </div>
710
+ <div class="tags">
711
+ <p class="tag_title">Parameters:</p>
712
+ <ul class="param">
713
+
714
+ <li>
715
+
716
+ <span class='name'>block</span>
717
+
718
+
719
+ <span class='type'>(<tt>T.proc.params(inner: <span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span>).returns(<span class='object_link'><a href="../Option.html" title="Mangrove::Option (module)">Option</a></span>[<span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span>])</tt>)</span>
720
+
721
+
722
+
723
+ </li>
724
+
725
+ </ul>
726
+
727
+ <p class="tag_title">Returns:</p>
728
+ <ul class="return">
729
+
730
+ <li>
731
+
732
+
733
+ <span class='type'>(<tt><span class='object_link'><a href="../Option.html" title="Mangrove::Option (module)">Option</a></span>[<span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span>]</tt>)</span>
734
+
735
+
736
+
737
+ </li>
738
+
739
+ </ul>
740
+
741
+ </div><table class="source_code">
742
+ <tr>
743
+ <td>
744
+ <pre class="lines">
745
+
746
+
747
+ 76
748
+ 77
749
+ 78</pre>
750
+ </td>
751
+ <td>
752
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 76</span>
753
+
754
+ <span class='kw'>def</span> <span class='id identifier rubyid_map_some'>map_some</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
755
+ <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='ivar'>@inner</span><span class='rparen'>)</span>
756
+ <span class='kw'>end</span></pre>
757
+ </td>
758
+ </tr>
759
+ </table>
760
+ </div>
761
+
762
+ <div class="method_details ">
763
+ <h3 class="signature " id="none?-instance_method">
764
+
765
+ #<strong>none?</strong> &#x21d2; <tt>Boolean</tt>
766
+
767
+
768
+
769
+
770
+
771
+ </h3><div class="docstring">
772
+ <div class="discussion">
773
+
774
+
775
+ </div>
776
+ </div>
777
+ <div class="tags">
778
+
779
+ <p class="tag_title">Returns:</p>
780
+ <ul class="return">
781
+
782
+ <li>
783
+
784
+
785
+ <span class='type'>(<tt>Boolean</tt>)</span>
786
+
787
+
788
+
789
+ </li>
790
+
791
+ </ul>
792
+
793
+ </div><table class="source_code">
794
+ <tr>
795
+ <td>
796
+ <pre class="lines">
797
+
798
+
799
+ 73</pre>
800
+ </td>
801
+ <td>
802
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 73</span>
803
+
804
+ <span class='kw'>def</span> <span class='id identifier rubyid_none?'>none?</span> <span class='op'>=</span> <span class='kw'>false</span></pre>
805
+ </td>
806
+ </tr>
807
+ </table>
808
+ </div>
809
+
810
+ <div class="method_details ">
811
+ <h3 class="signature " id="some?-instance_method">
812
+
813
+ #<strong>some?</strong> &#x21d2; <tt>Boolean</tt>
814
+
815
+
816
+
817
+
818
+
819
+ </h3><div class="docstring">
820
+ <div class="discussion">
821
+
822
+
823
+ </div>
824
+ </div>
825
+ <div class="tags">
826
+
827
+ <p class="tag_title">Returns:</p>
828
+ <ul class="return">
829
+
830
+ <li>
831
+
832
+
833
+ <span class='type'>(<tt>Boolean</tt>)</span>
834
+
835
+
836
+
837
+ </li>
838
+
839
+ </ul>
840
+
841
+ </div><table class="source_code">
842
+ <tr>
843
+ <td>
844
+ <pre class="lines">
845
+
846
+
847
+ 70</pre>
848
+ </td>
849
+ <td>
850
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 70</span>
851
+
852
+ <span class='kw'>def</span> <span class='id identifier rubyid_some?'>some?</span> <span class='op'>=</span> <span class='kw'>true</span></pre>
853
+ </td>
854
+ </tr>
855
+ </table>
856
+ </div>
857
+
858
+ <div class="method_details ">
859
+ <h3 class="signature " id="transpose-instance_method">
860
+
861
+ #<strong>transpose</strong>(_err) &#x21d2; <tt><span class='object_link'><a href="../Result.html" title="Mangrove::Result (module)">Mangrove::Result</a></span>[<span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span>, T.type_parameter(:ErrType)]</tt>
862
+
863
+
864
+
865
+
866
+
867
+ </h3><div class="docstring">
868
+ <div class="discussion">
869
+
870
+
871
+ </div>
872
+ </div>
873
+ <div class="tags">
874
+ <p class="tag_title">Parameters:</p>
875
+ <ul class="param">
876
+
877
+ <li>
878
+
879
+ <span class='name'>_err</span>
880
+
881
+
882
+ <span class='type'>(<tt>T.type_parameter(:ErrType)</tt>)</span>
883
+
884
+
885
+
886
+ </li>
887
+
888
+ </ul>
889
+
890
+ <p class="tag_title">Returns:</p>
891
+ <ul class="return">
892
+
893
+ <li>
894
+
895
+
896
+ <span class='type'>(<tt><span class='object_link'><a href="../Result.html" title="Mangrove::Result (module)">Mangrove::Result</a></span>[<span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span>, T.type_parameter(:ErrType)]</tt>)</span>
897
+
898
+
899
+
900
+ </li>
901
+
902
+ </ul>
903
+
904
+ </div><table class="source_code">
905
+ <tr>
906
+ <td>
907
+ <pre class="lines">
908
+
909
+
910
+ 86
911
+ 87
912
+ 88</pre>
913
+ </td>
914
+ <td>
915
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 86</span>
916
+
917
+ <span class='kw'>def</span> <span class='id identifier rubyid_transpose'>transpose</span><span class='lparen'>(</span><span class='id identifier rubyid__err'>_err</span><span class='rparen'>)</span>
918
+ <span class='const'><span class='object_link'><a href="../Result.html" title="Mangrove::Result (module)">Result</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Result/Ok.html" title="Mangrove::Result::Ok (class)">Ok</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../Result/Ok.html#initialize-instance_method" title="Mangrove::Result::Ok#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='ivar'>@inner</span><span class='rparen'>)</span>
919
+ <span class='kw'>end</span></pre>
920
+ </td>
921
+ </tr>
922
+ </table>
923
+ </div>
924
+
925
+ <div class="method_details ">
926
+ <h3 class="signature " id="unwrap-instance_method">
927
+
928
+ #<strong>unwrap</strong> &#x21d2; <tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>
929
+
930
+
931
+
932
+
933
+
934
+ </h3><div class="docstring">
935
+ <div class="discussion">
936
+
937
+
938
+ </div>
939
+ </div>
940
+ <div class="tags">
941
+
942
+ <p class="tag_title">Returns:</p>
943
+ <ul class="return">
944
+
945
+ <li>
946
+
947
+
948
+ <span class='type'>(<tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>)</span>
949
+
950
+
951
+
952
+ </li>
953
+
954
+ </ul>
955
+
956
+ </div><table class="source_code">
957
+ <tr>
958
+ <td>
959
+ <pre class="lines">
960
+
961
+
962
+ 50
963
+ 51
964
+ 52</pre>
965
+ </td>
966
+ <td>
967
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 50</span>
968
+
969
+ <span class='kw'>def</span> <span class='id identifier rubyid_unwrap'>unwrap</span>
970
+ <span class='ivar'>@inner</span>
971
+ <span class='kw'>end</span></pre>
972
+ </td>
973
+ </tr>
974
+ </table>
975
+ </div>
976
+
977
+ <div class="method_details ">
978
+ <h3 class="signature " id="unwrap!-instance_method">
979
+
980
+ #<strong>unwrap!</strong> &#x21d2; <tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>
981
+
982
+
983
+
984
+
985
+
986
+ </h3><div class="docstring">
987
+ <div class="discussion">
988
+
989
+
990
+ </div>
991
+ </div>
992
+ <div class="tags">
993
+
994
+ <p class="tag_title">Returns:</p>
995
+ <ul class="return">
996
+
997
+ <li>
998
+
999
+
1000
+ <span class='type'>(<tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>)</span>
1001
+
1002
+
1003
+
1004
+ </li>
1005
+
1006
+ </ul>
1007
+
1008
+ </div><table class="source_code">
1009
+ <tr>
1010
+ <td>
1011
+ <pre class="lines">
1012
+
1013
+
1014
+ 60
1015
+ 61
1016
+ 62</pre>
1017
+ </td>
1018
+ <td>
1019
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 60</span>
1020
+
1021
+ <span class='kw'>def</span> <span class='id identifier rubyid_unwrap!'>unwrap!</span>
1022
+ <span class='ivar'>@inner</span>
1023
+ <span class='kw'>end</span></pre>
1024
+ </td>
1025
+ </tr>
1026
+ </table>
1027
+ </div>
1028
+
1029
+ <div class="method_details ">
1030
+ <h3 class="signature " id="unwrap_or-instance_method">
1031
+
1032
+ #<strong>unwrap_or</strong>(_default) &#x21d2; <tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>
1033
+
1034
+
1035
+
1036
+
1037
+
1038
+ </h3><div class="docstring">
1039
+ <div class="discussion">
1040
+
1041
+
1042
+ </div>
1043
+ </div>
1044
+ <div class="tags">
1045
+ <p class="tag_title">Parameters:</p>
1046
+ <ul class="param">
1047
+
1048
+ <li>
1049
+
1050
+ <span class='name'>_default</span>
1051
+
1052
+
1053
+ <span class='type'>(<tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>)</span>
1054
+
1055
+
1056
+
1057
+ </li>
1058
+
1059
+ </ul>
1060
+
1061
+ <p class="tag_title">Returns:</p>
1062
+ <ul class="return">
1063
+
1064
+ <li>
1065
+
1066
+
1067
+ <span class='type'>(<tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>)</span>
1068
+
1069
+
1070
+
1071
+ </li>
1072
+
1073
+ </ul>
1074
+
1075
+ </div><table class="source_code">
1076
+ <tr>
1077
+ <td>
1078
+ <pre class="lines">
1079
+
1080
+
1081
+ 55
1082
+ 56
1083
+ 57</pre>
1084
+ </td>
1085
+ <td>
1086
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 55</span>
1087
+
1088
+ <span class='kw'>def</span> <span class='id identifier rubyid_unwrap_or'>unwrap_or</span><span class='lparen'>(</span><span class='id identifier rubyid__default'>_default</span><span class='rparen'>)</span>
1089
+ <span class='ivar'>@inner</span>
1090
+ <span class='kw'>end</span></pre>
1091
+ </td>
1092
+ </tr>
1093
+ </table>
1094
+ </div>
1095
+
1096
+ </div>
1097
+
1098
+ </div>
1099
+
1100
+ <div id="footer">
1101
+ Generated on Fri Sep 1 17:32:57 2023 by
1102
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1103
+ 0.9.34 (ruby-3.2.2).
1104
+ </div>
1105
+
1106
+ </div>
1107
+ </body>
1108
+ </html>