mangrove 0.5.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -2
- data/docs/Mangrove/ControlFlow/ControlSignal.html +1 -1
- data/docs/Mangrove/ControlFlow/Handler/ClassMethods.html +1 -1
- data/docs/Mangrove/ControlFlow/Handler.html +1 -1
- data/docs/Mangrove/ControlFlow/Rewriter.html +1 -1
- data/docs/Mangrove/ControlFlow.html +5 -16
- data/docs/Mangrove/Option/ControlSignal.html +1 -1
- data/docs/Mangrove/Option/None.html +121 -32
- data/docs/Mangrove/Option/Some.html +90 -1
- data/docs/Mangrove/Option.html +106 -17
- data/docs/Mangrove/Result/ControlSignal.html +1 -1
- data/docs/Mangrove/Result/Err.html +1 -1
- data/docs/Mangrove/Result/Ok.html +1 -1
- data/docs/Mangrove/Result.html +1 -1
- data/docs/Mangrove.html +3 -3
- data/docs/_index.html +1 -26
- data/docs/class_list.html +1 -1
- data/docs/file.README.html +3 -3
- data/docs/index.html +3 -3
- data/docs/method_list.html +89 -105
- data/docs/top-level-namespace.html +1 -1
- data/lib/mangrove/control_flow/rewriter.rb +4 -1
- data/lib/mangrove/option.rb +13 -0
- data/lib/mangrove/version.rb +1 -1
- data/lib/mangrove.rb +0 -1
- metadata +2 -3
- data/lib/mangrove/control_flow.rb +0 -84
data/docs/method_list.html
CHANGED
@@ -44,22 +44,6 @@
|
|
44
44
|
<ul id="full_list" class="method">
|
45
45
|
|
46
46
|
|
47
|
-
<li class="odd ">
|
48
|
-
<div class="item">
|
49
|
-
<span class='object_link'><a href="Mangrove/Result/Ok.html#==-instance_method" title="Mangrove::Result::Ok#== (method)">#==</a></span>
|
50
|
-
<small>Mangrove::Result::Ok</small>
|
51
|
-
</div>
|
52
|
-
</li>
|
53
|
-
|
54
|
-
|
55
|
-
<li class="even ">
|
56
|
-
<div class="item">
|
57
|
-
<span class='object_link'><a href="Mangrove/Option/Some.html#==-instance_method" title="Mangrove::Option::Some#== (method)">#==</a></span>
|
58
|
-
<small>Mangrove::Option::Some</small>
|
59
|
-
</div>
|
60
|
-
</li>
|
61
|
-
|
62
|
-
|
63
47
|
<li class="odd ">
|
64
48
|
<div class="item">
|
65
49
|
<span class='object_link'><a href="Mangrove/Option.html#==-instance_method" title="Mangrove::Option#== (method)">#==</a></span>
|
@@ -70,55 +54,55 @@
|
|
70
54
|
|
71
55
|
<li class="even ">
|
72
56
|
<div class="item">
|
73
|
-
<span class='object_link'><a href="Mangrove/
|
74
|
-
<small>Mangrove::
|
57
|
+
<span class='object_link'><a href="Mangrove/Result/ControlSignal.html#==-instance_method" title="Mangrove::Result::ControlSignal#== (method)">#==</a></span>
|
58
|
+
<small>Mangrove::Result::ControlSignal</small>
|
75
59
|
</div>
|
76
60
|
</li>
|
77
61
|
|
78
62
|
|
79
63
|
<li class="odd ">
|
80
64
|
<div class="item">
|
81
|
-
<span class='object_link'><a href="Mangrove/Result/
|
82
|
-
<small>Mangrove::Result::
|
65
|
+
<span class='object_link'><a href="Mangrove/Result/Ok.html#==-instance_method" title="Mangrove::Result::Ok#== (method)">#==</a></span>
|
66
|
+
<small>Mangrove::Result::Ok</small>
|
83
67
|
</div>
|
84
68
|
</li>
|
85
69
|
|
86
70
|
|
87
71
|
<li class="even ">
|
88
72
|
<div class="item">
|
89
|
-
<span class='object_link'><a href="Mangrove/
|
90
|
-
<small>Mangrove::
|
73
|
+
<span class='object_link'><a href="Mangrove/Option/ControlSignal.html#==-instance_method" title="Mangrove::Option::ControlSignal#== (method)">#==</a></span>
|
74
|
+
<small>Mangrove::Option::ControlSignal</small>
|
91
75
|
</div>
|
92
76
|
</li>
|
93
77
|
|
94
78
|
|
95
79
|
<li class="odd ">
|
96
80
|
<div class="item">
|
97
|
-
<span class='object_link'><a href="Mangrove/
|
98
|
-
<small>Mangrove::
|
81
|
+
<span class='object_link'><a href="Mangrove/Option/None.html#==-instance_method" title="Mangrove::Option::None#== (method)">#==</a></span>
|
82
|
+
<small>Mangrove::Option::None</small>
|
99
83
|
</div>
|
100
84
|
</li>
|
101
85
|
|
102
86
|
|
103
87
|
<li class="even ">
|
104
88
|
<div class="item">
|
105
|
-
<span class='object_link'><a href="Mangrove/
|
106
|
-
<small>Mangrove::
|
89
|
+
<span class='object_link'><a href="Mangrove/Result.html#==-instance_method" title="Mangrove::Result#== (method)">#==</a></span>
|
90
|
+
<small>Mangrove::Result</small>
|
107
91
|
</div>
|
108
92
|
</li>
|
109
93
|
|
110
94
|
|
111
95
|
<li class="odd ">
|
112
96
|
<div class="item">
|
113
|
-
<span class='object_link'><a href="Mangrove/
|
114
|
-
<small>Mangrove::
|
97
|
+
<span class='object_link'><a href="Mangrove/Option/Some.html#==-instance_method" title="Mangrove::Option::Some#== (method)">#==</a></span>
|
98
|
+
<small>Mangrove::Option::Some</small>
|
115
99
|
</div>
|
116
100
|
</li>
|
117
101
|
|
118
102
|
|
119
103
|
<li class="even ">
|
120
104
|
<div class="item">
|
121
|
-
<span class='object_link'><a href="Mangrove/Result/Err.html
|
105
|
+
<span class='object_link'><a href="Mangrove/Result/Err.html#==-instance_method" title="Mangrove::Result::Err#== (method)">#==</a></span>
|
122
106
|
<small>Mangrove::Result::Err</small>
|
123
107
|
</div>
|
124
108
|
</li>
|
@@ -126,23 +110,23 @@
|
|
126
110
|
|
127
111
|
<li class="odd ">
|
128
112
|
<div class="item">
|
129
|
-
<span class='object_link'><a href="Mangrove/Result.html#err%3F-instance_method" title="Mangrove::Result#err? (method)">#err?</a></span>
|
130
|
-
<small>Mangrove::Result</small>
|
113
|
+
<span class='object_link'><a href="Mangrove/Result/Ok.html#err%3F-instance_method" title="Mangrove::Result::Ok#err? (method)">#err?</a></span>
|
114
|
+
<small>Mangrove::Result::Ok</small>
|
131
115
|
</div>
|
132
116
|
</li>
|
133
117
|
|
134
118
|
|
135
119
|
<li class="even ">
|
136
120
|
<div class="item">
|
137
|
-
<span class='object_link'><a href="Mangrove/Result
|
138
|
-
<small>Mangrove::Result
|
121
|
+
<span class='object_link'><a href="Mangrove/Result.html#err%3F-instance_method" title="Mangrove::Result#err? (method)">#err?</a></span>
|
122
|
+
<small>Mangrove::Result</small>
|
139
123
|
</div>
|
140
124
|
</li>
|
141
125
|
|
142
126
|
|
143
127
|
<li class="odd ">
|
144
128
|
<div class="item">
|
145
|
-
<span class='object_link'><a href="Mangrove/Result/Err.html#
|
129
|
+
<span class='object_link'><a href="Mangrove/Result/Err.html#err%3F-instance_method" title="Mangrove::Result::Err#err? (method)">#err?</a></span>
|
146
130
|
<small>Mangrove::Result::Err</small>
|
147
131
|
</div>
|
148
132
|
</li>
|
@@ -150,64 +134,64 @@
|
|
150
134
|
|
151
135
|
<li class="even ">
|
152
136
|
<div class="item">
|
153
|
-
<span class='object_link'><a href="Mangrove/
|
154
|
-
<small>Mangrove::
|
137
|
+
<span class='object_link'><a href="Mangrove/Result/Err.html#err_inner-instance_method" title="Mangrove::Result::Err#err_inner (method)">#err_inner</a></span>
|
138
|
+
<small>Mangrove::Result::Err</small>
|
155
139
|
</div>
|
156
140
|
</li>
|
157
141
|
|
158
142
|
|
159
143
|
<li class="odd ">
|
160
144
|
<div class="item">
|
161
|
-
<span class='object_link'><a href="Mangrove/
|
162
|
-
<small>Mangrove::
|
145
|
+
<span class='object_link'><a href="Mangrove/Result.html#expect!-instance_method" title="Mangrove::Result#expect! (method)">#expect!</a></span>
|
146
|
+
<small>Mangrove::Result</small>
|
163
147
|
</div>
|
164
148
|
</li>
|
165
149
|
|
166
150
|
|
167
151
|
<li class="even ">
|
168
152
|
<div class="item">
|
169
|
-
<span class='object_link'><a href="Mangrove/Result/
|
170
|
-
<small>Mangrove::Result::
|
153
|
+
<span class='object_link'><a href="Mangrove/Result/Err.html#expect!-instance_method" title="Mangrove::Result::Err#expect! (method)">#expect!</a></span>
|
154
|
+
<small>Mangrove::Result::Err</small>
|
171
155
|
</div>
|
172
156
|
</li>
|
173
157
|
|
174
158
|
|
175
159
|
<li class="odd ">
|
176
160
|
<div class="item">
|
177
|
-
<span class='object_link'><a href="Mangrove/Option/
|
178
|
-
<small>Mangrove::Option::
|
161
|
+
<span class='object_link'><a href="Mangrove/Option/None.html#expect!-instance_method" title="Mangrove::Option::None#expect! (method)">#expect!</a></span>
|
162
|
+
<small>Mangrove::Option::None</small>
|
179
163
|
</div>
|
180
164
|
</li>
|
181
165
|
|
182
166
|
|
183
167
|
<li class="even ">
|
184
168
|
<div class="item">
|
185
|
-
<span class='object_link'><a href="Mangrove/Result/
|
186
|
-
<small>Mangrove::Result::
|
169
|
+
<span class='object_link'><a href="Mangrove/Result/Ok.html#expect!-instance_method" title="Mangrove::Result::Ok#expect! (method)">#expect!</a></span>
|
170
|
+
<small>Mangrove::Result::Ok</small>
|
187
171
|
</div>
|
188
172
|
</li>
|
189
173
|
|
190
174
|
|
191
175
|
<li class="odd ">
|
192
176
|
<div class="item">
|
193
|
-
<span class='object_link'><a href="Mangrove/
|
194
|
-
<small>Mangrove::
|
177
|
+
<span class='object_link'><a href="Mangrove/Option.html#expect!-instance_method" title="Mangrove::Option#expect! (method)">#expect!</a></span>
|
178
|
+
<small>Mangrove::Option</small>
|
195
179
|
</div>
|
196
180
|
</li>
|
197
181
|
|
198
182
|
|
199
183
|
<li class="even ">
|
200
184
|
<div class="item">
|
201
|
-
<span class='object_link'><a href="Mangrove/
|
202
|
-
<small>Mangrove::
|
185
|
+
<span class='object_link'><a href="Mangrove/Option/Some.html#expect!-instance_method" title="Mangrove::Option::Some#expect! (method)">#expect!</a></span>
|
186
|
+
<small>Mangrove::Option::Some</small>
|
203
187
|
</div>
|
204
188
|
</li>
|
205
189
|
|
206
190
|
|
207
191
|
<li class="odd ">
|
208
192
|
<div class="item">
|
209
|
-
<span class='object_link'><a href="Mangrove/
|
210
|
-
<small>Mangrove::
|
193
|
+
<span class='object_link'><a href="Mangrove/Result.html#from_results-class_method" title="Mangrove::Result.from_results (method)">from_results</a></span>
|
194
|
+
<small>Mangrove::Result</small>
|
211
195
|
</div>
|
212
196
|
</li>
|
213
197
|
|
@@ -230,8 +214,8 @@
|
|
230
214
|
|
231
215
|
<li class="even ">
|
232
216
|
<div class="item">
|
233
|
-
<span class='object_link'><a href="Mangrove/Result/
|
234
|
-
<small>Mangrove::Result::
|
217
|
+
<span class='object_link'><a href="Mangrove/Result/ControlSignal.html#initialize-instance_method" title="Mangrove::Result::ControlSignal#initialize (method)">#initialize</a></span>
|
218
|
+
<small>Mangrove::Result::ControlSignal</small>
|
235
219
|
</div>
|
236
220
|
</li>
|
237
221
|
|
@@ -254,8 +238,8 @@
|
|
254
238
|
|
255
239
|
<li class="odd ">
|
256
240
|
<div class="item">
|
257
|
-
<span class='object_link'><a href="Mangrove/Result/
|
258
|
-
<small>Mangrove::Result::
|
241
|
+
<span class='object_link'><a href="Mangrove/Result/Err.html#initialize-instance_method" title="Mangrove::Result::Err#initialize (method)">#initialize</a></span>
|
242
|
+
<small>Mangrove::Result::Err</small>
|
259
243
|
</div>
|
260
244
|
</li>
|
261
245
|
|
@@ -270,16 +254,16 @@
|
|
270
254
|
|
271
255
|
<li class="odd ">
|
272
256
|
<div class="item">
|
273
|
-
<span class='object_link'><a href="Mangrove/
|
274
|
-
<small>Mangrove::
|
257
|
+
<span class='object_link'><a href="Mangrove/Result/ControlSignal.html#inner_value-instance_method" title="Mangrove::Result::ControlSignal#inner_value (method)">#inner_value</a></span>
|
258
|
+
<small>Mangrove::Result::ControlSignal</small>
|
275
259
|
</div>
|
276
260
|
</li>
|
277
261
|
|
278
262
|
|
279
263
|
<li class="even ">
|
280
264
|
<div class="item">
|
281
|
-
<span class='object_link'><a href="Mangrove/
|
282
|
-
<small>Mangrove::
|
265
|
+
<span class='object_link'><a href="Mangrove/Option/ControlSignal.html#inner_value-instance_method" title="Mangrove::Option::ControlSignal#inner_value (method)">#inner_value</a></span>
|
266
|
+
<small>Mangrove::Option::ControlSignal</small>
|
283
267
|
</div>
|
284
268
|
</li>
|
285
269
|
|
@@ -294,16 +278,16 @@
|
|
294
278
|
|
295
279
|
<li class="even ">
|
296
280
|
<div class="item">
|
297
|
-
<span class='object_link'><a href="Mangrove/Result.html#map_err-instance_method" title="Mangrove::Result#map_err (method)">#map_err</a></span>
|
298
|
-
<small>Mangrove::Result</small>
|
281
|
+
<span class='object_link'><a href="Mangrove/Result/Ok.html#map_err-instance_method" title="Mangrove::Result::Ok#map_err (method)">#map_err</a></span>
|
282
|
+
<small>Mangrove::Result::Ok</small>
|
299
283
|
</div>
|
300
284
|
</li>
|
301
285
|
|
302
286
|
|
303
287
|
<li class="odd ">
|
304
288
|
<div class="item">
|
305
|
-
<span class='object_link'><a href="Mangrove/Result
|
306
|
-
<small>Mangrove::Result
|
289
|
+
<span class='object_link'><a href="Mangrove/Result.html#map_err-instance_method" title="Mangrove::Result#map_err (method)">#map_err</a></span>
|
290
|
+
<small>Mangrove::Result</small>
|
307
291
|
</div>
|
308
292
|
</li>
|
309
293
|
|
@@ -318,32 +302,32 @@
|
|
318
302
|
|
319
303
|
<li class="odd ">
|
320
304
|
<div class="item">
|
321
|
-
<span class='object_link'><a href="Mangrove/Option
|
322
|
-
<small>Mangrove::Option
|
305
|
+
<span class='object_link'><a href="Mangrove/Option.html#map_none-instance_method" title="Mangrove::Option#map_none (method)">#map_none</a></span>
|
306
|
+
<small>Mangrove::Option</small>
|
323
307
|
</div>
|
324
308
|
</li>
|
325
309
|
|
326
310
|
|
327
311
|
<li class="even ">
|
328
312
|
<div class="item">
|
329
|
-
<span class='object_link'><a href="Mangrove/Option.html#map_none-instance_method" title="Mangrove::Option#map_none (method)">#map_none</a></span>
|
330
|
-
<small>Mangrove::Option</small>
|
313
|
+
<span class='object_link'><a href="Mangrove/Option/None.html#map_none-instance_method" title="Mangrove::Option::None#map_none (method)">#map_none</a></span>
|
314
|
+
<small>Mangrove::Option::None</small>
|
331
315
|
</div>
|
332
316
|
</li>
|
333
317
|
|
334
318
|
|
335
319
|
<li class="odd ">
|
336
320
|
<div class="item">
|
337
|
-
<span class='object_link'><a href="Mangrove/Result.html#map_ok-instance_method" title="Mangrove::Result#map_ok (method)">#map_ok</a></span>
|
338
|
-
<small>Mangrove::Result</small>
|
321
|
+
<span class='object_link'><a href="Mangrove/Result/Err.html#map_ok-instance_method" title="Mangrove::Result::Err#map_ok (method)">#map_ok</a></span>
|
322
|
+
<small>Mangrove::Result::Err</small>
|
339
323
|
</div>
|
340
324
|
</li>
|
341
325
|
|
342
326
|
|
343
327
|
<li class="even ">
|
344
328
|
<div class="item">
|
345
|
-
<span class='object_link'><a href="Mangrove/Result
|
346
|
-
<small>Mangrove::Result
|
329
|
+
<span class='object_link'><a href="Mangrove/Result.html#map_ok-instance_method" title="Mangrove::Result#map_ok (method)">#map_ok</a></span>
|
330
|
+
<small>Mangrove::Result</small>
|
347
331
|
</div>
|
348
332
|
</li>
|
349
333
|
|
@@ -358,16 +342,16 @@
|
|
358
342
|
|
359
343
|
<li class="even ">
|
360
344
|
<div class="item">
|
361
|
-
<span class='object_link'><a href="Mangrove/Option/
|
362
|
-
<small>Mangrove::Option::
|
345
|
+
<span class='object_link'><a href="Mangrove/Option/Some.html#map_some-instance_method" title="Mangrove::Option::Some#map_some (method)">#map_some</a></span>
|
346
|
+
<small>Mangrove::Option::Some</small>
|
363
347
|
</div>
|
364
348
|
</li>
|
365
349
|
|
366
350
|
|
367
351
|
<li class="odd ">
|
368
352
|
<div class="item">
|
369
|
-
<span class='object_link'><a href="Mangrove/Option/
|
370
|
-
<small>Mangrove::Option::
|
353
|
+
<span class='object_link'><a href="Mangrove/Option/None.html#map_some-instance_method" title="Mangrove::Option::None#map_some (method)">#map_some</a></span>
|
354
|
+
<small>Mangrove::Option::None</small>
|
371
355
|
</div>
|
372
356
|
</li>
|
373
357
|
|
@@ -382,8 +366,8 @@
|
|
382
366
|
|
383
367
|
<li class="odd ">
|
384
368
|
<div class="item">
|
385
|
-
<span class='object_link'><a href="Mangrove/
|
386
|
-
<small>Mangrove::
|
369
|
+
<span class='object_link'><a href="Mangrove/Option/None.html#none%3F-instance_method" title="Mangrove::Option::None#none? (method)">#none?</a></span>
|
370
|
+
<small>Mangrove::Option::None</small>
|
387
371
|
</div>
|
388
372
|
</li>
|
389
373
|
|
@@ -406,16 +390,16 @@
|
|
406
390
|
|
407
391
|
<li class="even ">
|
408
392
|
<div class="item">
|
409
|
-
<span class='object_link'><a href="Mangrove/
|
410
|
-
<small>Mangrove::
|
393
|
+
<span class='object_link'><a href="Mangrove/Result.html#ok%3F-instance_method" title="Mangrove::Result#ok? (method)">#ok?</a></span>
|
394
|
+
<small>Mangrove::Result</small>
|
411
395
|
</div>
|
412
396
|
</li>
|
413
397
|
|
414
398
|
|
415
399
|
<li class="odd ">
|
416
400
|
<div class="item">
|
417
|
-
<span class='object_link'><a href="Mangrove/Result.html#ok%3F-instance_method" title="Mangrove::Result#ok? (method)">#ok?</a></span>
|
418
|
-
<small>Mangrove::Result</small>
|
401
|
+
<span class='object_link'><a href="Mangrove/Result/Ok.html#ok%3F-instance_method" title="Mangrove::Result::Ok#ok? (method)">#ok?</a></span>
|
402
|
+
<small>Mangrove::Result::Ok</small>
|
419
403
|
</div>
|
420
404
|
</li>
|
421
405
|
|
@@ -430,7 +414,7 @@
|
|
430
414
|
|
431
415
|
<li class="odd ">
|
432
416
|
<div class="item">
|
433
|
-
<span class='object_link'><a href="Mangrove/Result/Ok.html#
|
417
|
+
<span class='object_link'><a href="Mangrove/Result/Ok.html#ok_inner-instance_method" title="Mangrove::Result::Ok#ok_inner (method)">#ok_inner</a></span>
|
434
418
|
<small>Mangrove::Result::Ok</small>
|
435
419
|
</div>
|
436
420
|
</li>
|
@@ -438,15 +422,15 @@
|
|
438
422
|
|
439
423
|
<li class="even ">
|
440
424
|
<div class="item">
|
441
|
-
<span class='object_link'><a href="Mangrove/
|
442
|
-
<small>Mangrove::
|
425
|
+
<span class='object_link'><a href="Mangrove/ControlFlow/Rewriter.html#on_block-instance_method" title="Mangrove::ControlFlow::Rewriter#on_block (method)">#on_block</a></span>
|
426
|
+
<small>Mangrove::ControlFlow::Rewriter</small>
|
443
427
|
</div>
|
444
428
|
</li>
|
445
429
|
|
446
430
|
|
447
431
|
<li class="odd ">
|
448
432
|
<div class="item">
|
449
|
-
<span class='object_link'><a href="Mangrove/ControlFlow/Rewriter.html#
|
433
|
+
<span class='object_link'><a href="Mangrove/ControlFlow/Rewriter.html#on_def-instance_method" title="Mangrove::ControlFlow::Rewriter#on_def (method)">#on_def</a></span>
|
450
434
|
<small>Mangrove::ControlFlow::Rewriter</small>
|
451
435
|
</div>
|
452
436
|
</li>
|
@@ -454,7 +438,7 @@
|
|
454
438
|
|
455
439
|
<li class="even ">
|
456
440
|
<div class="item">
|
457
|
-
<span class='object_link'><a href="Mangrove/ControlFlow/Rewriter.html#
|
441
|
+
<span class='object_link'><a href="Mangrove/ControlFlow/Rewriter.html#on_defs-instance_method" title="Mangrove::ControlFlow::Rewriter#on_defs (method)">#on_defs</a></span>
|
458
442
|
<small>Mangrove::ControlFlow::Rewriter</small>
|
459
443
|
</div>
|
460
444
|
</li>
|
@@ -462,16 +446,16 @@
|
|
462
446
|
|
463
447
|
<li class="odd ">
|
464
448
|
<div class="item">
|
465
|
-
<span class='object_link'><a href="Mangrove/
|
466
|
-
<small>Mangrove::
|
449
|
+
<span class='object_link'><a href="Mangrove/Option.html#some%3F-instance_method" title="Mangrove::Option#some? (method)">#some?</a></span>
|
450
|
+
<small>Mangrove::Option</small>
|
467
451
|
</div>
|
468
452
|
</li>
|
469
453
|
|
470
454
|
|
471
455
|
<li class="even ">
|
472
456
|
<div class="item">
|
473
|
-
<span class='object_link'><a href="Mangrove/
|
474
|
-
<small>Mangrove::
|
457
|
+
<span class='object_link'><a href="Mangrove/Option/Some.html#some%3F-instance_method" title="Mangrove::Option::Some#some? (method)">#some?</a></span>
|
458
|
+
<small>Mangrove::Option::Some</small>
|
475
459
|
</div>
|
476
460
|
</li>
|
477
461
|
|
@@ -486,7 +470,7 @@
|
|
486
470
|
|
487
471
|
<li class="even ">
|
488
472
|
<div class="item">
|
489
|
-
<span class='object_link'><a href="Mangrove/Option/Some.html#
|
473
|
+
<span class='object_link'><a href="Mangrove/Option/Some.html#transpose-instance_method" title="Mangrove::Option::Some#transpose (method)">#transpose</a></span>
|
490
474
|
<small>Mangrove::Option::Some</small>
|
491
475
|
</div>
|
492
476
|
</li>
|
@@ -494,7 +478,7 @@
|
|
494
478
|
|
495
479
|
<li class="odd ">
|
496
480
|
<div class="item">
|
497
|
-
<span class='object_link'><a href="Mangrove/Option.html#
|
481
|
+
<span class='object_link'><a href="Mangrove/Option.html#transpose-instance_method" title="Mangrove::Option#transpose (method)">#transpose</a></span>
|
498
482
|
<small>Mangrove::Option</small>
|
499
483
|
</div>
|
500
484
|
</li>
|
@@ -502,16 +486,16 @@
|
|
502
486
|
|
503
487
|
<li class="even ">
|
504
488
|
<div class="item">
|
505
|
-
<span class='object_link'><a href="Mangrove/Option/
|
506
|
-
<small>Mangrove::Option::
|
489
|
+
<span class='object_link'><a href="Mangrove/Option/None.html#transpose-instance_method" title="Mangrove::Option::None#transpose (method)">#transpose</a></span>
|
490
|
+
<small>Mangrove::Option::None</small>
|
507
491
|
</div>
|
508
492
|
</li>
|
509
493
|
|
510
494
|
|
511
495
|
<li class="odd ">
|
512
496
|
<div class="item">
|
513
|
-
<span class='object_link'><a href="Mangrove/
|
514
|
-
<small>Mangrove::
|
497
|
+
<span class='object_link'><a href="Mangrove/Option/Some.html#unwrap-instance_method" title="Mangrove::Option::Some#unwrap (method)">#unwrap</a></span>
|
498
|
+
<small>Mangrove::Option::Some</small>
|
515
499
|
</div>
|
516
500
|
</li>
|
517
501
|
|
@@ -526,16 +510,16 @@
|
|
526
510
|
|
527
511
|
<li class="odd ">
|
528
512
|
<div class="item">
|
529
|
-
<span class='object_link'><a href="Mangrove/
|
530
|
-
<small>Mangrove::
|
513
|
+
<span class='object_link'><a href="Mangrove/Result.html#unwrap!-instance_method" title="Mangrove::Result#unwrap! (method)">#unwrap!</a></span>
|
514
|
+
<small>Mangrove::Result</small>
|
531
515
|
</div>
|
532
516
|
</li>
|
533
517
|
|
534
518
|
|
535
519
|
<li class="even ">
|
536
520
|
<div class="item">
|
537
|
-
<span class='object_link'><a href="Mangrove/
|
538
|
-
<small>Mangrove::
|
521
|
+
<span class='object_link'><a href="Mangrove/Option/Some.html#unwrap!-instance_method" title="Mangrove::Option::Some#unwrap! (method)">#unwrap!</a></span>
|
522
|
+
<small>Mangrove::Option::Some</small>
|
539
523
|
</div>
|
540
524
|
</li>
|
541
525
|
|
@@ -550,16 +534,16 @@
|
|
550
534
|
|
551
535
|
<li class="even ">
|
552
536
|
<div class="item">
|
553
|
-
<span class='object_link'><a href="Mangrove/
|
554
|
-
<small>Mangrove::
|
537
|
+
<span class='object_link'><a href="Mangrove/Result/Err.html#unwrap!-instance_method" title="Mangrove::Result::Err#unwrap! (method)">#unwrap!</a></span>
|
538
|
+
<small>Mangrove::Result::Err</small>
|
555
539
|
</div>
|
556
540
|
</li>
|
557
541
|
|
558
542
|
|
559
543
|
<li class="odd ">
|
560
544
|
<div class="item">
|
561
|
-
<span class='object_link'><a href="Mangrove/Option
|
562
|
-
<small>Mangrove::Option
|
545
|
+
<span class='object_link'><a href="Mangrove/Option.html#unwrap!-instance_method" title="Mangrove::Option#unwrap! (method)">#unwrap!</a></span>
|
546
|
+
<small>Mangrove::Option</small>
|
563
547
|
</div>
|
564
548
|
</li>
|
565
549
|
|
@@ -582,8 +566,8 @@
|
|
582
566
|
|
583
567
|
<li class="even ">
|
584
568
|
<div class="item">
|
585
|
-
<span class='object_link'><a href="Mangrove/
|
586
|
-
<small>Mangrove::
|
569
|
+
<span class='object_link'><a href="Mangrove/Option/Some.html#unwrap_or-instance_method" title="Mangrove::Option::Some#unwrap_or (method)">#unwrap_or</a></span>
|
570
|
+
<small>Mangrove::Option::Some</small>
|
587
571
|
</div>
|
588
572
|
</li>
|
589
573
|
|
@@ -100,7 +100,7 @@
|
|
100
100
|
</div>
|
101
101
|
|
102
102
|
<div id="footer">
|
103
|
-
Generated on
|
103
|
+
Generated on Tue Sep 12 17:35:09 2023 by
|
104
104
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
105
105
|
0.9.34 (ruby-3.2.2).
|
106
106
|
</div>
|
data/lib/mangrove/option.rb
CHANGED
@@ -82,6 +82,11 @@ module Mangrove
|
|
82
82
|
self
|
83
83
|
end
|
84
84
|
|
85
|
+
sig { override.type_parameters(:ErrType).params(_err: T.type_parameter(:ErrType)).returns(Mangrove::Result[InnerType, T.type_parameter(:ErrType)]) }
|
86
|
+
def transpose(_err)
|
87
|
+
Result::Ok.new(@inner)
|
88
|
+
end
|
89
|
+
|
85
90
|
private
|
86
91
|
|
87
92
|
sig { returns(InnerType) }
|
@@ -141,6 +146,11 @@ module Mangrove
|
|
141
146
|
def map_none(&block)
|
142
147
|
block.call
|
143
148
|
end
|
149
|
+
|
150
|
+
sig { override.type_parameters(:ErrType).params(err: T.type_parameter(:ErrType)).returns(Mangrove::Result[InnerType, T.type_parameter(:ErrType)]) }
|
151
|
+
def transpose(err)
|
152
|
+
Result::Err.new(err)
|
153
|
+
end
|
144
154
|
end
|
145
155
|
|
146
156
|
sig { abstract.params(other: BasicObject).returns(T::Boolean) }
|
@@ -166,5 +176,8 @@ module Mangrove
|
|
166
176
|
|
167
177
|
sig { abstract.params(block: T.proc.returns(Option[InnerType])).returns(Option[InnerType]) }
|
168
178
|
def map_none(&block); end
|
179
|
+
|
180
|
+
sig { abstract.type_parameters(:ErrType).params(err: T.type_parameter(:ErrType)).returns(Mangrove::Result[InnerType, T.type_parameter(:ErrType)]) }
|
181
|
+
def transpose(err); end
|
169
182
|
end
|
170
183
|
end
|
data/lib/mangrove/version.rb
CHANGED
data/lib/mangrove.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mangrove
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuma Murata
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sorbet-runtime
|
@@ -107,7 +107,6 @@ files:
|
|
107
107
|
- docs/top-level-namespace.html
|
108
108
|
- hooks/pre-push
|
109
109
|
- lib/mangrove.rb
|
110
|
-
- lib/mangrove/control_flow.rb
|
111
110
|
- lib/mangrove/control_flow/control_signal.rb
|
112
111
|
- lib/mangrove/control_flow/rewriter.rb
|
113
112
|
- lib/mangrove/option.rb
|