mangrove 0.9.2 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -244,7 +244,7 @@
244
244
  <li class="public ">
245
245
  <span class="summary_signature">
246
246
 
247
- <a href="#map_none-instance_method" title="#map_none (instance method)">#<strong>map_none</strong>(&amp;_block) &#x21d2; Option::Some[InnerType] </a>
247
+ <a href="#map-instance_method" title="#map (instance method)">#<strong>map</strong>(&amp;block) &#x21d2; ::Mangrove::Option[T.type_parameter(:NewInnerType)] </a>
248
248
 
249
249
 
250
250
 
@@ -266,7 +266,7 @@
266
266
  <li class="public ">
267
267
  <span class="summary_signature">
268
268
 
269
- <a href="#map_some-instance_method" title="#map_some (instance method)">#<strong>map_some</strong>(&amp;block) &#x21d2; Option[InnerType] </a>
269
+ <a href="#none%3F-instance_method" title="#none? (instance method)">#<strong>none?</strong> &#x21d2; Boolean </a>
270
270
 
271
271
 
272
272
 
@@ -288,7 +288,7 @@
288
288
  <li class="public ">
289
289
  <span class="summary_signature">
290
290
 
291
- <a href="#none%3F-instance_method" title="#none? (instance method)">#<strong>none?</strong> &#x21d2; Boolean </a>
291
+ <a href="#or-instance_method" title="#or (instance method)">#<strong>or</strong>(_default) &#x21d2; Option[InnerType] </a>
292
292
 
293
293
 
294
294
 
@@ -432,6 +432,11 @@
432
432
 
433
433
 
434
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
+
435
440
 
436
441
  <div id="constructor_details" class="method_details_list">
437
442
  <h2>Constructor Details</h2>
@@ -475,12 +480,12 @@
475
480
  <pre class="lines">
476
481
 
477
482
 
478
- 32
479
- 33
480
- 34</pre>
483
+ 46
484
+ 47
485
+ 48</pre>
481
486
  </td>
482
487
  <td>
483
- <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 32</span>
488
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 46</span>
484
489
 
485
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>
486
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>
@@ -549,20 +554,20 @@
549
554
  <pre class="lines">
550
555
 
551
556
 
552
- 37
553
- 38
554
- 39
555
- 40
556
- 41
557
- 42
558
- 43
559
- 44
560
- 45
561
- 46
562
- 47</pre>
557
+ 51
558
+ 52
559
+ 53
560
+ 54
561
+ 55
562
+ 56
563
+ 57
564
+ 58
565
+ 59
566
+ 60
567
+ 61</pre>
563
568
  </td>
564
569
  <td>
565
- <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 37</span>
570
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 51</span>
566
571
 
567
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>
568
573
  <span class='kw'>case</span> <span class='id identifier rubyid_other'>other</span>
@@ -632,12 +637,12 @@
632
637
  <pre class="lines">
633
638
 
634
639
 
635
- 65
636
- 66
637
- 67</pre>
640
+ 79
641
+ 80
642
+ 81</pre>
638
643
  </td>
639
644
  <td>
640
- <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 65</span>
645
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 79</span>
641
646
 
642
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>
643
648
  <span class='ivar'>@inner</span>
@@ -699,12 +704,12 @@
699
704
  <pre class="lines">
700
705
 
701
706
 
702
- 70
703
- 71
704
- 72</pre>
707
+ 84
708
+ 85
709
+ 86</pre>
705
710
  </td>
706
711
  <td>
707
- <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 70</span>
712
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 84</span>
708
713
 
709
714
  <span class='kw'>def</span> <span class='id identifier rubyid_expect_with!'>expect_with!</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid__block'>_block</span><span class='rparen'>)</span>
710
715
  <span class='ivar'>@inner</span>
@@ -715,9 +720,9 @@
715
720
  </div>
716
721
 
717
722
  <div class="method_details ">
718
- <h3 class="signature " id="map_none-instance_method">
723
+ <h3 class="signature " id="map-instance_method">
719
724
 
720
- #<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>
725
+ #<strong>map</strong>(&amp;block) &#x21d2; <tt><span class='object_link'><a href="../Option.html" title="Mangrove::Option (module)">::Mangrove::Option</a></span>[T.type_parameter(:NewInnerType)]</tt>
721
726
 
722
727
 
723
728
 
@@ -735,10 +740,10 @@
735
740
 
736
741
  <li>
737
742
 
738
- <span class='name'>_block</span>
743
+ <span class='name'>block</span>
739
744
 
740
745
 
741
- <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>
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>
742
747
 
743
748
 
744
749
 
@@ -752,7 +757,7 @@
752
757
  <li>
753
758
 
754
759
 
755
- <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>
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>
756
761
 
757
762
 
758
763
 
@@ -766,15 +771,15 @@
766
771
  <pre class="lines">
767
772
 
768
773
 
769
- 86
770
- 87
771
- 88</pre>
774
+ 95
775
+ 96
776
+ 97</pre>
772
777
  </td>
773
778
  <td>
774
- <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 86</span>
779
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 95</span>
775
780
 
776
- <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>
777
- <span class='kw'>self</span>
781
+ <span class='kw'>def</span> <span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</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>
778
783
  <span class='kw'>end</span></pre>
779
784
  </td>
780
785
  </tr>
@@ -782,9 +787,9 @@
782
787
  </div>
783
788
 
784
789
  <div class="method_details ">
785
- <h3 class="signature " id="map_some-instance_method">
790
+ <h3 class="signature " id="none?-instance_method">
786
791
 
787
- #<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>
792
+ #<strong>none?</strong> &#x21d2; <tt>Boolean</tt>
788
793
 
789
794
 
790
795
 
@@ -797,29 +802,14 @@
797
802
  </div>
798
803
  </div>
799
804
  <div class="tags">
800
- <p class="tag_title">Parameters:</p>
801
- <ul class="param">
802
-
803
- <li>
804
-
805
- <span class='name'>block</span>
806
-
807
-
808
- <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>
809
-
810
-
811
-
812
- </li>
813
805
 
814
- </ul>
815
-
816
806
  <p class="tag_title">Returns:</p>
817
807
  <ul class="return">
818
808
 
819
809
  <li>
820
810
 
821
811
 
822
- <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>
812
+ <span class='type'>(<tt>Boolean</tt>)</span>
823
813
 
824
814
 
825
815
 
@@ -833,25 +823,21 @@
833
823
  <pre class="lines">
834
824
 
835
825
 
836
- 81
837
- 82
838
- 83</pre>
826
+ 92</pre>
839
827
  </td>
840
828
  <td>
841
- <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 81</span>
829
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 92</span>
842
830
 
843
- <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>
844
- <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>
845
- <span class='kw'>end</span></pre>
831
+ <span class='kw'>def</span> <span class='id identifier rubyid_none?'>none?</span> <span class='op'>=</span> <span class='kw'>false</span></pre>
846
832
  </td>
847
833
  </tr>
848
834
  </table>
849
835
  </div>
850
836
 
851
837
  <div class="method_details ">
852
- <h3 class="signature " id="none?-instance_method">
838
+ <h3 class="signature " id="or-instance_method">
853
839
 
854
- #<strong>none?</strong> &#x21d2; <tt>Boolean</tt>
840
+ #<strong>or</strong>(_default) &#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>
855
841
 
856
842
 
857
843
 
@@ -864,14 +850,29 @@
864
850
  </div>
865
851
  </div>
866
852
  <div class="tags">
853
+ <p class="tag_title">Parameters:</p>
854
+ <ul class="param">
867
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
+
868
869
  <p class="tag_title">Returns:</p>
869
870
  <ul class="return">
870
871
 
871
872
  <li>
872
873
 
873
874
 
874
- <span class='type'>(<tt>Boolean</tt>)</span>
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>
875
876
 
876
877
 
877
878
 
@@ -885,12 +886,16 @@
885
886
  <pre class="lines">
886
887
 
887
888
 
888
- 78</pre>
889
+ 100
890
+ 101
891
+ 102</pre>
889
892
  </td>
890
893
  <td>
891
- <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 78</span>
894
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 100</span>
892
895
 
893
- <span class='kw'>def</span> <span class='id identifier rubyid_none?'>none?</span> <span class='op'>=</span> <span class='kw'>false</span></pre>
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>
894
899
  </td>
895
900
  </tr>
896
901
  </table>
@@ -933,10 +938,10 @@
933
938
  <pre class="lines">
934
939
 
935
940
 
936
- 75</pre>
941
+ 89</pre>
937
942
  </td>
938
943
  <td>
939
- <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 75</span>
944
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 89</span>
940
945
 
941
946
  <span class='kw'>def</span> <span class='id identifier rubyid_some?'>some?</span> <span class='op'>=</span> <span class='kw'>true</span></pre>
942
947
  </td>
@@ -996,12 +1001,12 @@
996
1001
  <pre class="lines">
997
1002
 
998
1003
 
999
- 91
1000
- 92
1001
- 93</pre>
1004
+ 105
1005
+ 106
1006
+ 107</pre>
1002
1007
  </td>
1003
1008
  <td>
1004
- <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 91</span>
1009
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 105</span>
1005
1010
 
1006
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>
1007
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>
@@ -1048,12 +1053,12 @@
1048
1053
  <pre class="lines">
1049
1054
 
1050
1055
 
1051
- 50
1052
- 51
1053
- 52</pre>
1056
+ 64
1057
+ 65
1058
+ 66</pre>
1054
1059
  </td>
1055
1060
  <td>
1056
- <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 50</span>
1061
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 64</span>
1057
1062
 
1058
1063
  <span class='kw'>def</span> <span class='id identifier rubyid_unwrap'>unwrap</span>
1059
1064
  <span class='ivar'>@inner</span>
@@ -1100,12 +1105,12 @@
1100
1105
  <pre class="lines">
1101
1106
 
1102
1107
 
1103
- 60
1104
- 61
1105
- 62</pre>
1108
+ 74
1109
+ 75
1110
+ 76</pre>
1106
1111
  </td>
1107
1112
  <td>
1108
- <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 60</span>
1113
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 74</span>
1109
1114
 
1110
1115
  <span class='kw'>def</span> <span class='id identifier rubyid_unwrap!'>unwrap!</span>
1111
1116
  <span class='ivar'>@inner</span>
@@ -1167,12 +1172,12 @@
1167
1172
  <pre class="lines">
1168
1173
 
1169
1174
 
1170
- 55
1171
- 56
1172
- 57</pre>
1175
+ 69
1176
+ 70
1177
+ 71</pre>
1173
1178
  </td>
1174
1179
  <td>
1175
- <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 55</span>
1180
+ <pre class="code"><span class="info file"># File 'lib/mangrove/option.rb', line 69</span>
1176
1181
 
1177
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>
1178
1183
  <span class='ivar'>@inner</span>
@@ -1187,7 +1192,7 @@
1187
1192
  </div>
1188
1193
 
1189
1194
  <div id="footer">
1190
- Generated on Tue Oct 24 12:49:57 2023 by
1195
+ Generated on Tue Oct 24 20:35:18 2023 by
1191
1196
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1192
1197
  0.9.34 (ruby-3.1.2).
1193
1198
  </div>