mangrove 0.18.1 → 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,139 +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
|
-
Module: Mangrove::ControlFlow::Handler
|
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::ControlFlow::Handler";
|
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 (H)</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="../ControlFlow.html" title="Mangrove::ControlFlow (module)">ControlFlow</a></span></span>
|
41
|
-
»
|
42
|
-
<span class="title">Handler</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::Handler
|
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
|
-
|
83
|
-
|
84
|
-
<dl>
|
85
|
-
<dt>Defined in:</dt>
|
86
|
-
<dd>lib/mangrove/control_flow.rb</dd>
|
87
|
-
</dl>
|
88
|
-
|
89
|
-
</div>
|
90
|
-
|
91
|
-
<h2>Overview</h2><div class="docstring">
|
92
|
-
<div class="discussion">
|
93
|
-
<div class="note abstract">
|
94
|
-
<strong>This module is abstract.</strong>
|
95
|
-
<div class='inline'>
|
96
|
-
<p>Subclasses must implement the ‘abstract` methods below.</p>
|
97
|
-
</div>
|
98
|
-
</div>
|
99
|
-
|
100
|
-
<p>Mangrove::ControlFlow::Handler</p>
|
101
|
-
|
102
|
-
|
103
|
-
</div>
|
104
|
-
</div>
|
105
|
-
<div class="tags">
|
106
|
-
|
107
|
-
|
108
|
-
</div><h2>Defined Under Namespace</h2>
|
109
|
-
<p class="children">
|
110
|
-
|
111
|
-
|
112
|
-
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Handler/ClassMethods.html" title="Mangrove::ControlFlow::Handler::ClassMethods (module)">ClassMethods</a></span>
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
</p>
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
</div>
|
130
|
-
|
131
|
-
<div id="footer">
|
132
|
-
Generated on Fri Sep 1 17:32:57 2023 by
|
133
|
-
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
134
|
-
0.9.34 (ruby-3.2.2).
|
135
|
-
</div>
|
136
|
-
|
137
|
-
</div>
|
138
|
-
</body>
|
139
|
-
</html>
|
@@ -1,331 +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::ControlFlow::Rewriter
|
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::ControlFlow::Rewriter";
|
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 (R)</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="../ControlFlow.html" title="Mangrove::ControlFlow (module)">ControlFlow</a></span></span>
|
41
|
-
»
|
42
|
-
<span class="title">Rewriter</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::ControlFlow::Rewriter
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
</h1>
|
67
|
-
<div class="box_info">
|
68
|
-
|
69
|
-
<dl>
|
70
|
-
<dt>Inherits:</dt>
|
71
|
-
<dd>
|
72
|
-
<span class="inheritName">Parser::TreeRewriter</span>
|
73
|
-
|
74
|
-
<ul class="fullTree">
|
75
|
-
<li>Object</li>
|
76
|
-
|
77
|
-
<li class="next">Parser::TreeRewriter</li>
|
78
|
-
|
79
|
-
<li class="next">Mangrove::ControlFlow::Rewriter</li>
|
80
|
-
|
81
|
-
</ul>
|
82
|
-
<a href="#" class="inheritanceTree">show all</a>
|
83
|
-
|
84
|
-
</dd>
|
85
|
-
</dl>
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
<dl>
|
98
|
-
<dt>Defined in:</dt>
|
99
|
-
<dd>lib/mangrove/control_flow/rewriter.rb</dd>
|
100
|
-
</dl>
|
101
|
-
|
102
|
-
</div>
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
<h2>
|
107
|
-
Constant Summary
|
108
|
-
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
109
|
-
</h2>
|
110
|
-
|
111
|
-
<dl class="constants">
|
112
|
-
|
113
|
-
<dt id="CONTROL_SIGNAL-constant" class="">CONTROL_SIGNAL =
|
114
|
-
|
115
|
-
</dt>
|
116
|
-
<dd><pre class="code"><span class='const'><span class='object_link'><a href="../../Mangrove.html" title="Mangrove (module)">Mangrove</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../ControlFlow.html" title="Mangrove::ControlFlow (module)">ControlFlow</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="ControlSignal.html" title="Mangrove::ControlFlow::ControlSignal (module)">ControlSignal</a></span></span></pre></dd>
|
117
|
-
|
118
|
-
</dl>
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
<h2>
|
129
|
-
Instance Method Summary
|
130
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
131
|
-
</h2>
|
132
|
-
|
133
|
-
<ul class="summary">
|
134
|
-
|
135
|
-
<li class="public ">
|
136
|
-
<span class="summary_signature">
|
137
|
-
|
138
|
-
<a href="#on_block-instance_method" title="#on_block (instance method)">#<strong>on_block</strong>(node) ⇒ Object </a>
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
</span>
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
153
|
-
|
154
|
-
</li>
|
155
|
-
|
156
|
-
|
157
|
-
<li class="public ">
|
158
|
-
<span class="summary_signature">
|
159
|
-
|
160
|
-
<a href="#on_def-instance_method" title="#on_def (instance method)">#<strong>on_def</strong>(node) ⇒ Object </a>
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
</span>
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
175
|
-
|
176
|
-
</li>
|
177
|
-
|
178
|
-
|
179
|
-
<li class="public ">
|
180
|
-
<span class="summary_signature">
|
181
|
-
|
182
|
-
<a href="#on_defs-instance_method" title="#on_defs (instance method)">#<strong>on_defs</strong>(node) ⇒ Object </a>
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
</span>
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
197
|
-
|
198
|
-
</li>
|
199
|
-
|
200
|
-
|
201
|
-
</ul>
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
<div id="instance_method_details" class="method_details_list">
|
208
|
-
<h2>Instance Method Details</h2>
|
209
|
-
|
210
|
-
|
211
|
-
<div class="method_details first">
|
212
|
-
<h3 class="signature first" id="on_block-instance_method">
|
213
|
-
|
214
|
-
#<strong>on_block</strong>(node) ⇒ <tt>Object</tt>
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
</h3><table class="source_code">
|
221
|
-
<tr>
|
222
|
-
<td>
|
223
|
-
<pre class="lines">
|
224
|
-
|
225
|
-
|
226
|
-
44
|
227
|
-
45
|
228
|
-
46
|
229
|
-
47
|
230
|
-
48
|
231
|
-
49</pre>
|
232
|
-
</td>
|
233
|
-
<td>
|
234
|
-
<pre class="code"><span class="info file"># File 'lib/mangrove/control_flow/rewriter.rb', line 44</span>
|
235
|
-
|
236
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_on_block'>on_block</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
|
237
|
-
<span class='id identifier rubyid_indent'>indent</span> <span class='op'>=</span> <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_location'>location</span><span class='period'>.</span><span class='id identifier rubyid_expression'>expression</span><span class='period'>.</span><span class='id identifier rubyid_begin'>begin</span><span class='period'>.</span><span class='id identifier rubyid_column'>column</span>
|
238
|
-
<span class='id identifier rubyid_code'>code</span> <span class='op'>=</span> <span class='const'>Unparser</span><span class='period'>.</span><span class='id identifier rubyid_unparse'>unparse</span><span class='lparen'>(</span><span class='id identifier rubyid_with_rescue'>with_rescue</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
239
|
-
<span class='id identifier rubyid_indented_code'>indented_code</span> <span class='op'>=</span> <span class='id identifier rubyid_code'>code</span><span class='period'>.</span><span class='id identifier rubyid_lines'>lines</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='period'>.</span><span class='id identifier rubyid_with_index'>with_index</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_line'>line</span><span class='comma'>,</span> <span class='id identifier rubyid_index'>index</span><span class='op'>|</span> <span class='id identifier rubyid_index'>index</span><span class='period'>.</span><span class='id identifier rubyid_zero?'>zero?</span> <span class='op'>?</span> <span class='id identifier rubyid_line'>line</span> <span class='op'>:</span> <span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span> <span class='op'>*</span> <span class='id identifier rubyid_indent'>indent</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='id identifier rubyid_line'>line</span> <span class='rbrace'>}</span>
|
240
|
-
<span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_location'>location</span><span class='period'>.</span><span class='id identifier rubyid_expression'>expression</span><span class='comma'>,</span> <span class='id identifier rubyid_indented_code'>indented_code</span><span class='rparen'>)</span>
|
241
|
-
<span class='kw'>end</span></pre>
|
242
|
-
</td>
|
243
|
-
</tr>
|
244
|
-
</table>
|
245
|
-
</div>
|
246
|
-
|
247
|
-
<div class="method_details ">
|
248
|
-
<h3 class="signature " id="on_def-instance_method">
|
249
|
-
|
250
|
-
#<strong>on_def</strong>(node) ⇒ <tt>Object</tt>
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
</h3><table class="source_code">
|
257
|
-
<tr>
|
258
|
-
<td>
|
259
|
-
<pre class="lines">
|
260
|
-
|
261
|
-
|
262
|
-
30
|
263
|
-
31
|
264
|
-
32
|
265
|
-
33
|
266
|
-
34
|
267
|
-
35</pre>
|
268
|
-
</td>
|
269
|
-
<td>
|
270
|
-
<pre class="code"><span class="info file"># File 'lib/mangrove/control_flow/rewriter.rb', line 30</span>
|
271
|
-
|
272
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_on_def'>on_def</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
|
273
|
-
<span class='id identifier rubyid_indent'>indent</span> <span class='op'>=</span> <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_location'>location</span><span class='period'>.</span><span class='id identifier rubyid_expression'>expression</span><span class='period'>.</span><span class='id identifier rubyid_begin'>begin</span><span class='period'>.</span><span class='id identifier rubyid_column'>column</span>
|
274
|
-
<span class='id identifier rubyid_code'>code</span> <span class='op'>=</span> <span class='const'>Unparser</span><span class='period'>.</span><span class='id identifier rubyid_unparse'>unparse</span><span class='lparen'>(</span><span class='id identifier rubyid_with_rescue'>with_rescue</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
275
|
-
<span class='id identifier rubyid_indented_code'>indented_code</span> <span class='op'>=</span> <span class='id identifier rubyid_code'>code</span><span class='period'>.</span><span class='id identifier rubyid_lines'>lines</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='period'>.</span><span class='id identifier rubyid_with_index'>with_index</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_line'>line</span><span class='comma'>,</span> <span class='id identifier rubyid_index'>index</span><span class='op'>|</span> <span class='id identifier rubyid_index'>index</span><span class='period'>.</span><span class='id identifier rubyid_zero?'>zero?</span> <span class='op'>?</span> <span class='id identifier rubyid_line'>line</span> <span class='op'>:</span> <span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span> <span class='op'>*</span> <span class='id identifier rubyid_indent'>indent</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='id identifier rubyid_line'>line</span> <span class='rbrace'>}</span>
|
276
|
-
<span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_location'>location</span><span class='period'>.</span><span class='id identifier rubyid_expression'>expression</span><span class='comma'>,</span> <span class='id identifier rubyid_indented_code'>indented_code</span><span class='rparen'>)</span>
|
277
|
-
<span class='kw'>end</span></pre>
|
278
|
-
</td>
|
279
|
-
</tr>
|
280
|
-
</table>
|
281
|
-
</div>
|
282
|
-
|
283
|
-
<div class="method_details ">
|
284
|
-
<h3 class="signature " id="on_defs-instance_method">
|
285
|
-
|
286
|
-
#<strong>on_defs</strong>(node) ⇒ <tt>Object</tt>
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
</h3><table class="source_code">
|
293
|
-
<tr>
|
294
|
-
<td>
|
295
|
-
<pre class="lines">
|
296
|
-
|
297
|
-
|
298
|
-
37
|
299
|
-
38
|
300
|
-
39
|
301
|
-
40
|
302
|
-
41
|
303
|
-
42</pre>
|
304
|
-
</td>
|
305
|
-
<td>
|
306
|
-
<pre class="code"><span class="info file"># File 'lib/mangrove/control_flow/rewriter.rb', line 37</span>
|
307
|
-
|
308
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_on_defs'>on_defs</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
|
309
|
-
<span class='id identifier rubyid_indent'>indent</span> <span class='op'>=</span> <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_location'>location</span><span class='period'>.</span><span class='id identifier rubyid_expression'>expression</span><span class='period'>.</span><span class='id identifier rubyid_begin'>begin</span><span class='period'>.</span><span class='id identifier rubyid_column'>column</span>
|
310
|
-
<span class='id identifier rubyid_code'>code</span> <span class='op'>=</span> <span class='const'>Unparser</span><span class='period'>.</span><span class='id identifier rubyid_unparse'>unparse</span><span class='lparen'>(</span><span class='id identifier rubyid_with_rescue'>with_rescue</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
311
|
-
<span class='id identifier rubyid_indented_code'>indented_code</span> <span class='op'>=</span> <span class='id identifier rubyid_code'>code</span><span class='period'>.</span><span class='id identifier rubyid_lines'>lines</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='period'>.</span><span class='id identifier rubyid_with_index'>with_index</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_line'>line</span><span class='comma'>,</span> <span class='id identifier rubyid_index'>index</span><span class='op'>|</span> <span class='id identifier rubyid_index'>index</span><span class='period'>.</span><span class='id identifier rubyid_zero?'>zero?</span> <span class='op'>?</span> <span class='id identifier rubyid_line'>line</span> <span class='op'>:</span> <span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span> <span class='op'>*</span> <span class='id identifier rubyid_indent'>indent</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='id identifier rubyid_line'>line</span> <span class='rbrace'>}</span>
|
312
|
-
<span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_location'>location</span><span class='period'>.</span><span class='id identifier rubyid_expression'>expression</span><span class='comma'>,</span> <span class='id identifier rubyid_indented_code'>indented_code</span><span class='rparen'>)</span>
|
313
|
-
<span class='kw'>end</span></pre>
|
314
|
-
</td>
|
315
|
-
</tr>
|
316
|
-
</table>
|
317
|
-
</div>
|
318
|
-
|
319
|
-
</div>
|
320
|
-
|
321
|
-
</div>
|
322
|
-
|
323
|
-
<div id="footer">
|
324
|
-
Generated on Tue Sep 12 17:51:34 2023 by
|
325
|
-
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
326
|
-
0.9.34 (ruby-3.2.2).
|
327
|
-
</div>
|
328
|
-
|
329
|
-
</div>
|
330
|
-
</body>
|
331
|
-
</html>
|
@@ -1,115 +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
|
-
Module: Mangrove::ControlFlow
|
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::ControlFlow";
|
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> »
|
40
|
-
<span class='title'><span class='object_link'><a href="../Mangrove.html" title="Mangrove (module)">Mangrove</a></span></span>
|
41
|
-
»
|
42
|
-
<span class="title">ControlFlow</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
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
</h1>
|
67
|
-
<div class="box_info">
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
<dl>
|
80
|
-
<dt>Defined in:</dt>
|
81
|
-
<dd>lib/mangrove/control_flow/control_signal.rb</dd>
|
82
|
-
</dl>
|
83
|
-
|
84
|
-
</div>
|
85
|
-
|
86
|
-
<h2>Defined Under Namespace</h2>
|
87
|
-
<p class="children">
|
88
|
-
|
89
|
-
|
90
|
-
<strong class="modules">Modules:</strong> <span class='object_link'><a href="ControlFlow/ControlSignal.html" title="Mangrove::ControlFlow::ControlSignal (module)">ControlSignal</a></span>
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
</p>
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
</div>
|
106
|
-
|
107
|
-
<div id="footer">
|
108
|
-
Generated on Wed Nov 15 22:20:24 2023 by
|
109
|
-
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
110
|
-
0.9.34 (ruby-3.1.2).
|
111
|
-
</div>
|
112
|
-
|
113
|
-
</div>
|
114
|
-
</body>
|
115
|
-
</html>
|