mangrove 0.4.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06e20e8a9945c52ddba260f01fa12a7f8e65fda55fe2a369f85eb296b428eeb7
4
- data.tar.gz: 524eba3f2d942063c597568e7d432f18cff9f6e5b85efc5eeadb3d055eaaac46
3
+ metadata.gz: 2da08457cd28358b038f3eed31a075eb3d49f9066802039e7d7a7859fc654fcc
4
+ data.tar.gz: 0ce95b6171a9cc3e00ab633f5057a1e95f0cee5f960dcb529968120ffac900c6
5
5
  SHA512:
6
- metadata.gz: 88cbb663b866dfd8fb559adc76b847a8501e1d96c237e0ef919c339381f142f4ce7a91482770bd239e2f68588793171c900e9b87a57f50f0c290d9982f944b2c
7
- data.tar.gz: 9c1b5d530382de4eeeeb2cf20e0a18abd184a0dbd10cbf66fef190f1d897026863449afa56fa0de4d34cb594659d00a93e5eab2ae6ec548050dbcb3ce20321d2
6
+ metadata.gz: ac5e297743c8ba30f8807f6c1bcdcd692e9bd40dee8321f10cade1ec5756845494dd1c31dfff74c59aa7e1297ff9b633c51d4dce14d0b9bfac2a99f74b8bc28b
7
+ data.tar.gz: 38613ef701d1f56e6d06855b886d4532e515c196e96d4287c9cb33ff9c8c412344e78129f3e54fb093447b4f574f7b0d1281a72ac783fe16616cace6f1de47ac
data/README.md CHANGED
@@ -29,7 +29,7 @@ expect(MyClass.new.divide_arguments_by_3([3, 4, 6])).to eq Mangrove::Result::Err
29
29
  expect(MyClass.new.divide_arguments_by_3([3, 6, 9])).to eq Mangrove::Result::Ok.new([1, 2, 3])
30
30
  ```
31
31
 
32
- Other examples are available at `spec/**/**_spec.rb`.
32
+ Other examples are available at [`spec/**/**_spec.rb`](https://github.com/kazzix14/mangrove/tree/main/spec).
33
33
 
34
34
  ## Features
35
35
  Most features are not implemented.
@@ -50,7 +50,8 @@ bundle add mangrove
50
50
 
51
51
  ## Usage
52
52
 
53
- see `spec/**/**_spec.rb`.
53
+ Documentation is available [here](https://kazzix14.github.io/mangrove/).
54
+ For more concrete examples, see [`spec/**/**_spec.rb`](https://github.com/kazzix14/mangrove/tree/main/spec).
54
55
 
55
56
  ```ruby
56
57
  Mangrove::Result[OkType, ErrType]
@@ -66,11 +67,13 @@ my_some = Option::Some.new(1234)
66
67
  my_none = Option::None.new
67
68
 
68
69
  # Including this Module into your class appends rescue clause into its methods. Results to `Option#unwrap!` and `Result#unwrap!` propagates to calling method like Ruet's `?` operator.
70
+ # https://doc.rust-lang.org/reference/expressions/operator-expr.html#the-question-mark-operator
69
71
  include Mangrove::ControlFlow::Handler
70
72
  ```
71
73
 
72
74
  ## Commands
73
75
  ```
76
+ git config core.hooksPath hooks
74
77
  bundle exec tapioca init
75
78
  bundle exec tapioca gems
76
79
  bundle exec tapioca dsl
@@ -81,6 +84,7 @@ bundle exec rubocop -DESP
81
84
  bundle exec srb typecheck
82
85
  bundle exec ordinare --check
83
86
  bundle exec ruboclean
87
+ bundle exec yardoc -o docs/ --plugin yard-sorbet
84
88
  rake build
85
89
  rake release
86
90
  ```
data/Rakefile CHANGED
@@ -8,7 +8,20 @@ task(:check) {
8
8
  system("bundle exec rubocop -DESP") &&
9
9
  system("bundle exec tapioca check-shims") &&
10
10
  system("bundle exec srb typecheck") &&
11
- system("bundle exec rspec -f d")
11
+ system("bundle exec rspec -f d") &&
12
+ # check doc version
13
+ system(
14
+ <<~SHELL
15
+ gem_version=`bundle info mangrove | grep -o '[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+'`
16
+ doc_version=`grep 'VERSION =' docs/Mangrove.html -A 5 | grep -o '[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+'`
17
+
18
+ if [ "$gem_version" = "$doc_version" ]; then
19
+ exit 0
20
+ else
21
+ exit 1
22
+ fi
23
+ SHELL
24
+ )
12
25
  }
13
26
 
14
27
  task default: :check
@@ -0,0 +1,223 @@
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
+ Module: Mangrove::ControlFlow::ControlSignal
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::ControlFlow::ControlSignal";
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 (C)</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="../ControlFlow.html" title="Mangrove::ControlFlow (module)">ControlFlow</a></span></span>
41
+ &raquo;
42
+ <span class="title">ControlSignal</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>Module: Mangrove::ControlFlow::ControlSignal
63
+ <span class="abstract note title">Abstract</span>
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+ <dl>
73
+ <dt>Extended by:</dt>
74
+ <dd>T::Helpers, T::Sig</dd>
75
+ </dl>
76
+
77
+
78
+
79
+
80
+
81
+
82
+ <dl>
83
+ <dt>Included in:</dt>
84
+ <dd><span class='object_link'><a href="../Option/ControlSignal.html" title="Mangrove::Option::ControlSignal (class)">Option::ControlSignal</a></span>, <span class='object_link'><a href="../Result/ControlSignal.html" title="Mangrove::Result::ControlSignal (class)">Result::ControlSignal</a></span></dd>
85
+ </dl>
86
+
87
+
88
+
89
+ <dl>
90
+ <dt>Defined in:</dt>
91
+ <dd>lib/mangrove/control_flow/control_signal.rb</dd>
92
+ </dl>
93
+
94
+ </div>
95
+
96
+ <h2>Overview</h2><div class="docstring">
97
+ <div class="discussion">
98
+ <div class="note abstract">
99
+ <strong>This module is abstract.</strong>
100
+ <div class='inline'>
101
+ <p>Subclasses must implement the ‘abstract` methods below.</p>
102
+ </div>
103
+ </div>
104
+
105
+
106
+ </div>
107
+ </div>
108
+ <div class="tags">
109
+
110
+
111
+ </div>
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+ <h2>
120
+ Instance Method Summary
121
+ <small><a href="#" class="summary_toggle">collapse</a></small>
122
+ </h2>
123
+
124
+ <ul class="summary">
125
+
126
+ <li class="public ">
127
+ <span class="summary_signature">
128
+
129
+ <a href="#inner_value-instance_method" title="#inner_value (instance method)">#<strong>inner_value</strong> &#x21d2; T.untyped </a>
130
+
131
+
132
+
133
+ </span>
134
+
135
+
136
+
137
+
138
+ <span class="abstract note title">abstract</span>
139
+
140
+
141
+
142
+
143
+ <span class="summary_desc"><div class='inline'></div></span>
144
+
145
+ </li>
146
+
147
+
148
+ </ul>
149
+
150
+
151
+
152
+
153
+
154
+
155
+ <div id="instance_method_details" class="method_details_list">
156
+ <h2>Instance Method Details</h2>
157
+
158
+
159
+ <div class="method_details first">
160
+ <h3 class="signature first" id="inner_value-instance_method">
161
+
162
+ #<strong>inner_value</strong> &#x21d2; <tt>T.untyped</tt>
163
+
164
+
165
+
166
+
167
+
168
+ </h3><div class="docstring">
169
+ <div class="discussion">
170
+ <div class="note abstract">
171
+ <strong>This method is abstract.</strong>
172
+ <div class='inline'></div>
173
+ </div>
174
+
175
+
176
+ </div>
177
+ </div>
178
+ <div class="tags">
179
+
180
+ <p class="tag_title">Returns:</p>
181
+ <ul class="return">
182
+
183
+ <li>
184
+
185
+
186
+ <span class='type'>(<tt>T.untyped</tt>)</span>
187
+
188
+
189
+
190
+ </li>
191
+
192
+ </ul>
193
+
194
+ </div><table class="source_code">
195
+ <tr>
196
+ <td>
197
+ <pre class="lines">
198
+
199
+
200
+ 13</pre>
201
+ </td>
202
+ <td>
203
+ <pre class="code"><span class="info file"># File 'lib/mangrove/control_flow/control_signal.rb', line 13</span>
204
+
205
+ <span class='kw'>def</span> <span class='id identifier rubyid_inner_value'>inner_value</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
206
+ </td>
207
+ </tr>
208
+ </table>
209
+ </div>
210
+
211
+ </div>
212
+
213
+ </div>
214
+
215
+ <div id="footer">
216
+ Generated on Fri Sep 1 17:32:57 2023 by
217
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
218
+ 0.9.34 (ruby-3.2.2).
219
+ </div>
220
+
221
+ </div>
222
+ </body>
223
+ </html>