mangrove 0.18.0 → 0.19.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/lib/mangrove/result.rb +92 -3
- data/lib/mangrove/version.rb +1 -1
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1 -5
- data/sorbet/rbi/gems/docile@1.4.0.rbi +376 -0
- data/sorbet/rbi/gems/json@2.6.3.rbi +73 -65
- data/sorbet/rbi/gems/prism@0.15.1.rbi +23916 -2
- data/sorbet/rbi/gems/rake@13.0.6.rbi +1 -141
- data/sorbet/rbi/gems/{rbi@0.1.1.rbi → rbi@0.1.3.rbi} +53 -57
- data/sorbet/rbi/gems/regexp_parser@2.8.2.rbi +37 -37
- data/sorbet/rbi/gems/rexml@3.2.6.rbi +2 -2
- data/sorbet/rbi/gems/rspec-core@3.12.2.rbi +8 -39
- data/sorbet/rbi/gems/rspec-expectations@3.12.3.rbi +25 -25
- data/sorbet/rbi/gems/rspec-mocks@3.12.6.rbi +4 -8
- data/sorbet/rbi/gems/rspec-sorbet@1.9.2.rbi +2 -2
- data/sorbet/rbi/gems/rspec-support@3.12.1.rbi +2 -2
- data/sorbet/rbi/gems/rspec@3.12.0.rbi +1 -1
- data/sorbet/rbi/gems/rubocop-ast@1.29.0.rbi +263 -176
- data/sorbet/rbi/gems/rubocop@1.57.1.rbi +1019 -719
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +5 -5
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +216 -0
- data/sorbet/rbi/gems/simplecov@0.21.2.rbi +2135 -0
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
- data/sorbet/rbi/gems/spoom@1.2.4.rbi +15 -15
- data/sorbet/rbi/gems/{tapioca@0.11.9.rbi → tapioca@0.11.10.rbi} +40 -29
- data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +1 -1
- data/sorbet/rbi/gems/yard@0.9.34.rbi +46 -50
- data/sorbet/tapioca/require.rb +6 -1
- metadata +9 -34
- data/docs/Mangrove/ControlFlow/ControlSignal.html +0 -223
- data/docs/Mangrove/ControlFlow/Handler/ClassMethods.html +0 -563
- data/docs/Mangrove/ControlFlow/Handler.html +0 -139
- data/docs/Mangrove/ControlFlow/Rewriter.html +0 -331
- data/docs/Mangrove/ControlFlow.html +0 -115
- data/docs/Mangrove/Option/ControlSignal.html +0 -434
- data/docs/Mangrove/Option/None.html +0 -1085
- data/docs/Mangrove/Option/Some.html +0 -1202
- data/docs/Mangrove/Option.html +0 -1145
- data/docs/Mangrove/Result/ControlSignal.html +0 -434
- data/docs/Mangrove/Result/Err.html +0 -2254
- data/docs/Mangrove/Result/Ok.html +0 -2219
- data/docs/Mangrove/Result.html +0 -2475
- data/docs/Mangrove.html +0 -144
- data/docs/_index.html +0 -225
- data/docs/class_list.html +0 -51
- data/docs/css/common.css +0 -1
- data/docs/css/full_list.css +0 -58
- data/docs/css/style.css +0 -497
- data/docs/file.README.html +0 -245
- data/docs/file_list.html +0 -56
- data/docs/frames.html +0 -17
- data/docs/index.html +0 -245
- data/docs/js/app.js +0 -314
- data/docs/js/full_list.js +0 -216
- data/docs/js/jquery.js +0 -4
- data/docs/method_list.html +0 -939
- data/docs/top-level-namespace.html +0 -110
- data/sorbet/rbi/gems/yarp@0.13.0.rbi +0 -21646
- data/sorbet/rbi/shims/mangrove/option.rbi +0 -15
- data/sorbet/rbi/shims/mangrove/result.rbi +0 -15
@@ -1,1202 +0,0 @@
|
|
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
|
-
— 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> »
|
40
|
-
<span class='title'><span class='object_link'><a href="../../Mangrove.html" title="Mangrove (module)">Mangrove</a></span></span> » <span class='title'><span class='object_link'><a href="../Option.html" title="Mangrove::Option (module)">Option</a></span></span>
|
41
|
-
»
|
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) ⇒ 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) ⇒ 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="#expect_with!-instance_method" title="#expect_with! (instance method)">#<strong>expect_with!</strong>(&_block) ⇒ InnerType </a>
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
</span>
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
216
|
-
|
217
|
-
</li>
|
218
|
-
|
219
|
-
|
220
|
-
<li class="public ">
|
221
|
-
<span class="summary_signature">
|
222
|
-
|
223
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(inner) ⇒ void </a>
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
</span>
|
228
|
-
|
229
|
-
|
230
|
-
<span class="note title constructor">constructor</span>
|
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-instance_method" title="#map (instance method)">#<strong>map</strong>(&block) ⇒ ::Mangrove::Option[T.type_parameter(:NewInnerType)] </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> ⇒ 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="#or-instance_method" title="#or (instance method)">#<strong>or</strong>(_default) ⇒ Option[InnerType] </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="#some%3F-instance_method" title="#some? (instance method)">#<strong>some?</strong> ⇒ Boolean </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="#transpose-instance_method" title="#transpose (instance method)">#<strong>transpose</strong>(_err) ⇒ Mangrove::Result[InnerType, T.type_parameter(:ErrType)] </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> ⇒ 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!-instance_method" title="#unwrap! (instance method)">#<strong>unwrap!</strong> ⇒ 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
|
-
<li class="public ">
|
399
|
-
<span class="summary_signature">
|
400
|
-
|
401
|
-
<a href="#unwrap_or-instance_method" title="#unwrap_or (instance method)">#<strong>unwrap_or</strong>(_default) ⇒ InnerType </a>
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
</span>
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
416
|
-
|
417
|
-
</li>
|
418
|
-
|
419
|
-
|
420
|
-
</ul>
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
<h3 class="inherited">Methods included from <span class='object_link'><a href="../Option.html" title="Mangrove::Option (module)">Mangrove::Option</a></span></h3>
|
436
|
-
<p class="inherited"><span class='object_link'><a href="../Option.html#from_nilable-class_method" title="Mangrove::Option.from_nilable (method)">from_nilable</a></span></p>
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
<div id="constructor_details" class="method_details_list">
|
442
|
-
<h2>Constructor Details</h2>
|
443
|
-
|
444
|
-
<div class="method_details first">
|
445
|
-
<h3 class="signature first" id="initialize-instance_method">
|
446
|
-
|
447
|
-
#<strong>initialize</strong>(inner) ⇒ <tt>void</tt>
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
</h3><div class="docstring">
|
454
|
-
<div class="discussion">
|
455
|
-
|
456
|
-
|
457
|
-
</div>
|
458
|
-
</div>
|
459
|
-
<div class="tags">
|
460
|
-
<p class="tag_title">Parameters:</p>
|
461
|
-
<ul class="param">
|
462
|
-
|
463
|
-
<li>
|
464
|
-
|
465
|
-
<span class='name'>inner</span>
|
466
|
-
|
467
|
-
|
468
|
-
<span class='type'>(<tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>)</span>
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
</li>
|
473
|
-
|
474
|
-
</ul>
|
475
|
-
|
476
|
-
|
477
|
-
</div><table class="source_code">
|
478
|
-
<tr>
|
479
|
-
<td>
|
480
|
-
<pre class="lines">
|
481
|
-
|
482
|
-
|
483
|
-
46
|
484
|
-
47
|
485
|
-
48</pre>
|
486
|
-
</td>
|
487
|
-
<td>
|
488
|
-
<pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 46</span>
|
489
|
-
|
490
|
-
<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>
|
491
|
-
<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>
|
492
|
-
<span class='kw'>end</span></pre>
|
493
|
-
</td>
|
494
|
-
</tr>
|
495
|
-
</table>
|
496
|
-
</div>
|
497
|
-
|
498
|
-
</div>
|
499
|
-
|
500
|
-
|
501
|
-
<div id="instance_method_details" class="method_details_list">
|
502
|
-
<h2>Instance Method Details</h2>
|
503
|
-
|
504
|
-
|
505
|
-
<div class="method_details first">
|
506
|
-
<h3 class="signature first" id="==-instance_method">
|
507
|
-
|
508
|
-
#<strong>==</strong>(other) ⇒ <tt>Boolean</tt>
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
</h3><div class="docstring">
|
515
|
-
<div class="discussion">
|
516
|
-
|
517
|
-
|
518
|
-
</div>
|
519
|
-
</div>
|
520
|
-
<div class="tags">
|
521
|
-
<p class="tag_title">Parameters:</p>
|
522
|
-
<ul class="param">
|
523
|
-
|
524
|
-
<li>
|
525
|
-
|
526
|
-
<span class='name'>other</span>
|
527
|
-
|
528
|
-
|
529
|
-
<span class='type'>(<tt>BasicObject</tt>)</span>
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
</li>
|
534
|
-
|
535
|
-
</ul>
|
536
|
-
|
537
|
-
<p class="tag_title">Returns:</p>
|
538
|
-
<ul class="return">
|
539
|
-
|
540
|
-
<li>
|
541
|
-
|
542
|
-
|
543
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
</li>
|
548
|
-
|
549
|
-
</ul>
|
550
|
-
|
551
|
-
</div><table class="source_code">
|
552
|
-
<tr>
|
553
|
-
<td>
|
554
|
-
<pre class="lines">
|
555
|
-
|
556
|
-
|
557
|
-
51
|
558
|
-
52
|
559
|
-
53
|
560
|
-
54
|
561
|
-
55
|
562
|
-
56
|
563
|
-
57
|
564
|
-
58
|
565
|
-
59
|
566
|
-
60
|
567
|
-
61</pre>
|
568
|
-
</td>
|
569
|
-
<td>
|
570
|
-
<pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 51</span>
|
571
|
-
|
572
|
-
<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>
|
573
|
-
<span class='kw'>case</span> <span class='id identifier rubyid_other'>other</span>
|
574
|
-
<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>
|
575
|
-
<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>
|
576
|
-
<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>
|
577
|
-
<span class='kw'>false</span>
|
578
|
-
<span class='kw'>else</span> <span class='comment'># rubocop:disable Lint/DuplicateBranch
|
579
|
-
</span> <span class='comment'># Because == is defined on BasicObject, we can't be sure that `other` is an Option
|
580
|
-
</span> <span class='kw'>false</span>
|
581
|
-
<span class='kw'>end</span>
|
582
|
-
<span class='kw'>end</span></pre>
|
583
|
-
</td>
|
584
|
-
</tr>
|
585
|
-
</table>
|
586
|
-
</div>
|
587
|
-
|
588
|
-
<div class="method_details ">
|
589
|
-
<h3 class="signature " id="expect!-instance_method">
|
590
|
-
|
591
|
-
#<strong>expect!</strong>(_message) ⇒ <tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
</h3><div class="docstring">
|
598
|
-
<div class="discussion">
|
599
|
-
|
600
|
-
|
601
|
-
</div>
|
602
|
-
</div>
|
603
|
-
<div class="tags">
|
604
|
-
<p class="tag_title">Parameters:</p>
|
605
|
-
<ul class="param">
|
606
|
-
|
607
|
-
<li>
|
608
|
-
|
609
|
-
<span class='name'>_message</span>
|
610
|
-
|
611
|
-
|
612
|
-
<span class='type'>(<tt>String</tt>)</span>
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
</li>
|
617
|
-
|
618
|
-
</ul>
|
619
|
-
|
620
|
-
<p class="tag_title">Returns:</p>
|
621
|
-
<ul class="return">
|
622
|
-
|
623
|
-
<li>
|
624
|
-
|
625
|
-
|
626
|
-
<span class='type'>(<tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>)</span>
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
</li>
|
631
|
-
|
632
|
-
</ul>
|
633
|
-
|
634
|
-
</div><table class="source_code">
|
635
|
-
<tr>
|
636
|
-
<td>
|
637
|
-
<pre class="lines">
|
638
|
-
|
639
|
-
|
640
|
-
79
|
641
|
-
80
|
642
|
-
81</pre>
|
643
|
-
</td>
|
644
|
-
<td>
|
645
|
-
<pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 79</span>
|
646
|
-
|
647
|
-
<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>
|
648
|
-
<span class='ivar'>@inner</span>
|
649
|
-
<span class='kw'>end</span></pre>
|
650
|
-
</td>
|
651
|
-
</tr>
|
652
|
-
</table>
|
653
|
-
</div>
|
654
|
-
|
655
|
-
<div class="method_details ">
|
656
|
-
<h3 class="signature " id="expect_with!-instance_method">
|
657
|
-
|
658
|
-
#<strong>expect_with!</strong>(&_block) ⇒ <tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
</h3><div class="docstring">
|
665
|
-
<div class="discussion">
|
666
|
-
|
667
|
-
|
668
|
-
</div>
|
669
|
-
</div>
|
670
|
-
<div class="tags">
|
671
|
-
<p class="tag_title">Parameters:</p>
|
672
|
-
<ul class="param">
|
673
|
-
|
674
|
-
<li>
|
675
|
-
|
676
|
-
<span class='name'>_block</span>
|
677
|
-
|
678
|
-
|
679
|
-
<span class='type'>(<tt>T.proc.returns(T.untyped)</tt>)</span>
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
</li>
|
684
|
-
|
685
|
-
</ul>
|
686
|
-
|
687
|
-
<p class="tag_title">Returns:</p>
|
688
|
-
<ul class="return">
|
689
|
-
|
690
|
-
<li>
|
691
|
-
|
692
|
-
|
693
|
-
<span class='type'>(<tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>)</span>
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
</li>
|
698
|
-
|
699
|
-
</ul>
|
700
|
-
|
701
|
-
</div><table class="source_code">
|
702
|
-
<tr>
|
703
|
-
<td>
|
704
|
-
<pre class="lines">
|
705
|
-
|
706
|
-
|
707
|
-
84
|
708
|
-
85
|
709
|
-
86</pre>
|
710
|
-
</td>
|
711
|
-
<td>
|
712
|
-
<pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 84</span>
|
713
|
-
|
714
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_expect_with!'>expect_with!</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid__block'>_block</span><span class='rparen'>)</span>
|
715
|
-
<span class='ivar'>@inner</span>
|
716
|
-
<span class='kw'>end</span></pre>
|
717
|
-
</td>
|
718
|
-
</tr>
|
719
|
-
</table>
|
720
|
-
</div>
|
721
|
-
|
722
|
-
<div class="method_details ">
|
723
|
-
<h3 class="signature " id="map-instance_method">
|
724
|
-
|
725
|
-
#<strong>map</strong>(&block) ⇒ <tt><span class='object_link'><a href="../Option.html" title="Mangrove::Option (module)">::Mangrove::Option</a></span>[T.type_parameter(:NewInnerType)]</tt>
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
</h3><div class="docstring">
|
732
|
-
<div class="discussion">
|
733
|
-
|
734
|
-
|
735
|
-
</div>
|
736
|
-
</div>
|
737
|
-
<div class="tags">
|
738
|
-
<p class="tag_title">Parameters:</p>
|
739
|
-
<ul class="param">
|
740
|
-
|
741
|
-
<li>
|
742
|
-
|
743
|
-
<span class='name'>block</span>
|
744
|
-
|
745
|
-
|
746
|
-
<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>[T.type_parameter(:NewInnerType)])</tt>)</span>
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
</li>
|
751
|
-
|
752
|
-
</ul>
|
753
|
-
|
754
|
-
<p class="tag_title">Returns:</p>
|
755
|
-
<ul class="return">
|
756
|
-
|
757
|
-
<li>
|
758
|
-
|
759
|
-
|
760
|
-
<span class='type'>(<tt><span class='object_link'><a href="../Option.html" title="Mangrove::Option (module)">::Mangrove::Option</a></span>[T.type_parameter(:NewInnerType)]</tt>)</span>
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
</li>
|
765
|
-
|
766
|
-
</ul>
|
767
|
-
|
768
|
-
</div><table class="source_code">
|
769
|
-
<tr>
|
770
|
-
<td>
|
771
|
-
<pre class="lines">
|
772
|
-
|
773
|
-
|
774
|
-
95
|
775
|
-
96
|
776
|
-
97</pre>
|
777
|
-
</td>
|
778
|
-
<td>
|
779
|
-
<pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 95</span>
|
780
|
-
|
781
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
782
|
-
<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>
|
783
|
-
<span class='kw'>end</span></pre>
|
784
|
-
</td>
|
785
|
-
</tr>
|
786
|
-
</table>
|
787
|
-
</div>
|
788
|
-
|
789
|
-
<div class="method_details ">
|
790
|
-
<h3 class="signature " id="none?-instance_method">
|
791
|
-
|
792
|
-
#<strong>none?</strong> ⇒ <tt>Boolean</tt>
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
</h3><div class="docstring">
|
799
|
-
<div class="discussion">
|
800
|
-
|
801
|
-
|
802
|
-
</div>
|
803
|
-
</div>
|
804
|
-
<div class="tags">
|
805
|
-
|
806
|
-
<p class="tag_title">Returns:</p>
|
807
|
-
<ul class="return">
|
808
|
-
|
809
|
-
<li>
|
810
|
-
|
811
|
-
|
812
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
</li>
|
817
|
-
|
818
|
-
</ul>
|
819
|
-
|
820
|
-
</div><table class="source_code">
|
821
|
-
<tr>
|
822
|
-
<td>
|
823
|
-
<pre class="lines">
|
824
|
-
|
825
|
-
|
826
|
-
92</pre>
|
827
|
-
</td>
|
828
|
-
<td>
|
829
|
-
<pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 92</span>
|
830
|
-
|
831
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_none?'>none?</span> <span class='op'>=</span> <span class='kw'>false</span></pre>
|
832
|
-
</td>
|
833
|
-
</tr>
|
834
|
-
</table>
|
835
|
-
</div>
|
836
|
-
|
837
|
-
<div class="method_details ">
|
838
|
-
<h3 class="signature " id="or-instance_method">
|
839
|
-
|
840
|
-
#<strong>or</strong>(_default) ⇒ <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>
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
</h3><div class="docstring">
|
847
|
-
<div class="discussion">
|
848
|
-
|
849
|
-
|
850
|
-
</div>
|
851
|
-
</div>
|
852
|
-
<div class="tags">
|
853
|
-
<p class="tag_title">Parameters:</p>
|
854
|
-
<ul class="param">
|
855
|
-
|
856
|
-
<li>
|
857
|
-
|
858
|
-
<span class='name'>_default</span>
|
859
|
-
|
860
|
-
|
861
|
-
<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>
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
</li>
|
866
|
-
|
867
|
-
</ul>
|
868
|
-
|
869
|
-
<p class="tag_title">Returns:</p>
|
870
|
-
<ul class="return">
|
871
|
-
|
872
|
-
<li>
|
873
|
-
|
874
|
-
|
875
|
-
<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>
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
</li>
|
880
|
-
|
881
|
-
</ul>
|
882
|
-
|
883
|
-
</div><table class="source_code">
|
884
|
-
<tr>
|
885
|
-
<td>
|
886
|
-
<pre class="lines">
|
887
|
-
|
888
|
-
|
889
|
-
100
|
890
|
-
101
|
891
|
-
102</pre>
|
892
|
-
</td>
|
893
|
-
<td>
|
894
|
-
<pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 100</span>
|
895
|
-
|
896
|
-
<span class='kw'>def</span> <span class='kw'>or</span><span class='lparen'>(</span><span class='id identifier rubyid__default'>_default</span><span class='rparen'>)</span>
|
897
|
-
<span class='kw'>self</span>
|
898
|
-
<span class='kw'>end</span></pre>
|
899
|
-
</td>
|
900
|
-
</tr>
|
901
|
-
</table>
|
902
|
-
</div>
|
903
|
-
|
904
|
-
<div class="method_details ">
|
905
|
-
<h3 class="signature " id="some?-instance_method">
|
906
|
-
|
907
|
-
#<strong>some?</strong> ⇒ <tt>Boolean</tt>
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
</h3><div class="docstring">
|
914
|
-
<div class="discussion">
|
915
|
-
|
916
|
-
|
917
|
-
</div>
|
918
|
-
</div>
|
919
|
-
<div class="tags">
|
920
|
-
|
921
|
-
<p class="tag_title">Returns:</p>
|
922
|
-
<ul class="return">
|
923
|
-
|
924
|
-
<li>
|
925
|
-
|
926
|
-
|
927
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
</li>
|
932
|
-
|
933
|
-
</ul>
|
934
|
-
|
935
|
-
</div><table class="source_code">
|
936
|
-
<tr>
|
937
|
-
<td>
|
938
|
-
<pre class="lines">
|
939
|
-
|
940
|
-
|
941
|
-
89</pre>
|
942
|
-
</td>
|
943
|
-
<td>
|
944
|
-
<pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 89</span>
|
945
|
-
|
946
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_some?'>some?</span> <span class='op'>=</span> <span class='kw'>true</span></pre>
|
947
|
-
</td>
|
948
|
-
</tr>
|
949
|
-
</table>
|
950
|
-
</div>
|
951
|
-
|
952
|
-
<div class="method_details ">
|
953
|
-
<h3 class="signature " id="transpose-instance_method">
|
954
|
-
|
955
|
-
#<strong>transpose</strong>(_err) ⇒ <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>
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
</h3><div class="docstring">
|
962
|
-
<div class="discussion">
|
963
|
-
|
964
|
-
|
965
|
-
</div>
|
966
|
-
</div>
|
967
|
-
<div class="tags">
|
968
|
-
<p class="tag_title">Parameters:</p>
|
969
|
-
<ul class="param">
|
970
|
-
|
971
|
-
<li>
|
972
|
-
|
973
|
-
<span class='name'>_err</span>
|
974
|
-
|
975
|
-
|
976
|
-
<span class='type'>(<tt>T.type_parameter(:ErrType)</tt>)</span>
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
</li>
|
981
|
-
|
982
|
-
</ul>
|
983
|
-
|
984
|
-
<p class="tag_title">Returns:</p>
|
985
|
-
<ul class="return">
|
986
|
-
|
987
|
-
<li>
|
988
|
-
|
989
|
-
|
990
|
-
<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>
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
</li>
|
995
|
-
|
996
|
-
</ul>
|
997
|
-
|
998
|
-
</div><table class="source_code">
|
999
|
-
<tr>
|
1000
|
-
<td>
|
1001
|
-
<pre class="lines">
|
1002
|
-
|
1003
|
-
|
1004
|
-
105
|
1005
|
-
106
|
1006
|
-
107</pre>
|
1007
|
-
</td>
|
1008
|
-
<td>
|
1009
|
-
<pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 105</span>
|
1010
|
-
|
1011
|
-
<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>
|
1012
|
-
<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>
|
1013
|
-
<span class='kw'>end</span></pre>
|
1014
|
-
</td>
|
1015
|
-
</tr>
|
1016
|
-
</table>
|
1017
|
-
</div>
|
1018
|
-
|
1019
|
-
<div class="method_details ">
|
1020
|
-
<h3 class="signature " id="unwrap-instance_method">
|
1021
|
-
|
1022
|
-
#<strong>unwrap</strong> ⇒ <tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
</h3><div class="docstring">
|
1029
|
-
<div class="discussion">
|
1030
|
-
|
1031
|
-
|
1032
|
-
</div>
|
1033
|
-
</div>
|
1034
|
-
<div class="tags">
|
1035
|
-
|
1036
|
-
<p class="tag_title">Returns:</p>
|
1037
|
-
<ul class="return">
|
1038
|
-
|
1039
|
-
<li>
|
1040
|
-
|
1041
|
-
|
1042
|
-
<span class='type'>(<tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>)</span>
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
</li>
|
1047
|
-
|
1048
|
-
</ul>
|
1049
|
-
|
1050
|
-
</div><table class="source_code">
|
1051
|
-
<tr>
|
1052
|
-
<td>
|
1053
|
-
<pre class="lines">
|
1054
|
-
|
1055
|
-
|
1056
|
-
64
|
1057
|
-
65
|
1058
|
-
66</pre>
|
1059
|
-
</td>
|
1060
|
-
<td>
|
1061
|
-
<pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 64</span>
|
1062
|
-
|
1063
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_unwrap'>unwrap</span>
|
1064
|
-
<span class='ivar'>@inner</span>
|
1065
|
-
<span class='kw'>end</span></pre>
|
1066
|
-
</td>
|
1067
|
-
</tr>
|
1068
|
-
</table>
|
1069
|
-
</div>
|
1070
|
-
|
1071
|
-
<div class="method_details ">
|
1072
|
-
<h3 class="signature " id="unwrap!-instance_method">
|
1073
|
-
|
1074
|
-
#<strong>unwrap!</strong> ⇒ <tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
</h3><div class="docstring">
|
1081
|
-
<div class="discussion">
|
1082
|
-
|
1083
|
-
|
1084
|
-
</div>
|
1085
|
-
</div>
|
1086
|
-
<div class="tags">
|
1087
|
-
|
1088
|
-
<p class="tag_title">Returns:</p>
|
1089
|
-
<ul class="return">
|
1090
|
-
|
1091
|
-
<li>
|
1092
|
-
|
1093
|
-
|
1094
|
-
<span class='type'>(<tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>)</span>
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
</li>
|
1099
|
-
|
1100
|
-
</ul>
|
1101
|
-
|
1102
|
-
</div><table class="source_code">
|
1103
|
-
<tr>
|
1104
|
-
<td>
|
1105
|
-
<pre class="lines">
|
1106
|
-
|
1107
|
-
|
1108
|
-
74
|
1109
|
-
75
|
1110
|
-
76</pre>
|
1111
|
-
</td>
|
1112
|
-
<td>
|
1113
|
-
<pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 74</span>
|
1114
|
-
|
1115
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_unwrap!'>unwrap!</span>
|
1116
|
-
<span class='ivar'>@inner</span>
|
1117
|
-
<span class='kw'>end</span></pre>
|
1118
|
-
</td>
|
1119
|
-
</tr>
|
1120
|
-
</table>
|
1121
|
-
</div>
|
1122
|
-
|
1123
|
-
<div class="method_details ">
|
1124
|
-
<h3 class="signature " id="unwrap_or-instance_method">
|
1125
|
-
|
1126
|
-
#<strong>unwrap_or</strong>(_default) ⇒ <tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
</h3><div class="docstring">
|
1133
|
-
<div class="discussion">
|
1134
|
-
|
1135
|
-
|
1136
|
-
</div>
|
1137
|
-
</div>
|
1138
|
-
<div class="tags">
|
1139
|
-
<p class="tag_title">Parameters:</p>
|
1140
|
-
<ul class="param">
|
1141
|
-
|
1142
|
-
<li>
|
1143
|
-
|
1144
|
-
<span class='name'>_default</span>
|
1145
|
-
|
1146
|
-
|
1147
|
-
<span class='type'>(<tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>)</span>
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
</li>
|
1152
|
-
|
1153
|
-
</ul>
|
1154
|
-
|
1155
|
-
<p class="tag_title">Returns:</p>
|
1156
|
-
<ul class="return">
|
1157
|
-
|
1158
|
-
<li>
|
1159
|
-
|
1160
|
-
|
1161
|
-
<span class='type'>(<tt><span class='object_link'><a href="#InnerType-constant" title="Mangrove::Option::Some::InnerType (constant)">InnerType</a></span></tt>)</span>
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
</li>
|
1166
|
-
|
1167
|
-
</ul>
|
1168
|
-
|
1169
|
-
</div><table class="source_code">
|
1170
|
-
<tr>
|
1171
|
-
<td>
|
1172
|
-
<pre class="lines">
|
1173
|
-
|
1174
|
-
|
1175
|
-
69
|
1176
|
-
70
|
1177
|
-
71</pre>
|
1178
|
-
</td>
|
1179
|
-
<td>
|
1180
|
-
<pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 69</span>
|
1181
|
-
|
1182
|
-
<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>
|
1183
|
-
<span class='ivar'>@inner</span>
|
1184
|
-
<span class='kw'>end</span></pre>
|
1185
|
-
</td>
|
1186
|
-
</tr>
|
1187
|
-
</table>
|
1188
|
-
</div>
|
1189
|
-
|
1190
|
-
</div>
|
1191
|
-
|
1192
|
-
</div>
|
1193
|
-
|
1194
|
-
<div id="footer">
|
1195
|
-
Generated on Wed Nov 15 22:12:59 2023 by
|
1196
|
-
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1197
|
-
0.9.34 (ruby-3.1.2).
|
1198
|
-
</div>
|
1199
|
-
|
1200
|
-
</div>
|
1201
|
-
</body>
|
1202
|
-
</html>
|