ruff 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/Gemfile.lock +5 -1
- data/README.md +6 -0
- data/Rakefile +28 -0
- data/docs/Ruff.html +311 -0
- data/docs/Ruff/Effect.html +414 -0
- data/docs/Ruff/Handler.html +570 -0
- data/docs/Ruff/Throws.html +117 -0
- data/docs/Ruff/Throws/Eff.html +363 -0
- data/docs/Ruff/Throws/Resend.html +363 -0
- data/docs/_index.html +166 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +496 -0
- data/docs/file.README.html +100 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +100 -0
- data/docs/js/app.js +303 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +163 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/ruff.rb +13 -0
- data/lib/ruff/effect.rb +15 -2
- data/lib/ruff/handler.rb +48 -4
- data/lib/ruff/objects.rb +32 -8
- data/lib/ruff/version.cpp.rb +5 -0
- data/lib/ruff/version.rb +1 -1
- data/ruff.gemspec +7 -4
- data/version.h +1 -0
- metadata +27 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d19fd7b2258ee195d8ed6461a6915f95b08378d2996d050e5f7d9fc04808ce5
|
4
|
+
data.tar.gz: 5f361ca976b0a14b68486879b5ff50e087bd330bd55f24ef2816b1ff83c48c3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ec3967a0ffdb1c583a9e1828b7624bba12bf83bc23a6520d90dbbcdab6a4d5326fa27c45dbd8bfaad843888632fb7e22d9e617229d7f38629cc417c8756c9c2
|
7
|
+
data.tar.gz: 761db5f8d827eae0586ff1f255a5ff82513acaf3ae7cff20e3374cea9ea282512f54a6874950b98213c9eb0cef15913efcabd3a99fa4c0da5e2fc8af6ceeb287
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ruff (0.0.
|
4
|
+
ruff (0.0.5)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
9
|
rake (10.5.0)
|
10
|
+
redcarpet (3.5.0)
|
11
|
+
yard (0.9.20)
|
10
12
|
|
11
13
|
PLATFORMS
|
12
14
|
ruby
|
@@ -14,7 +16,9 @@ PLATFORMS
|
|
14
16
|
DEPENDENCIES
|
15
17
|
bundler (~> 2.0)
|
16
18
|
rake (~> 10.0)
|
19
|
+
redcarpet
|
17
20
|
ruff!
|
21
|
+
yard
|
18
22
|
|
19
23
|
BUNDLED WITH
|
20
24
|
2.0.1
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -1,2 +1,30 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
+
require "yard"
|
3
|
+
require "ruff/version"
|
4
|
+
|
5
|
+
YARD::Rake::YardocTask.new {|doc|
|
6
|
+
doc.name = "doc"
|
7
|
+
|
8
|
+
[
|
9
|
+
"--output-dir=docs",
|
10
|
+
"--title=Ruff #{Ruff::VERSION} Documentation",
|
11
|
+
"--markup-provider=redcarpet",
|
12
|
+
"--markup=markdown",
|
13
|
+
"--charset=utf-8"
|
14
|
+
].each{|opt| doc.options << opt }
|
15
|
+
|
16
|
+
doc.files = FileList.new "lib/**/*.rb"
|
17
|
+
}
|
18
|
+
|
19
|
+
desc "new version"
|
20
|
+
task(:newver, [:major, :minor, :patch]){|_, args|
|
21
|
+
File.open('version.h', 'r+'){|f|
|
22
|
+
f.write <<-EOL
|
23
|
+
#define RUFF_VERSION "#{args.to_a.join "."}"
|
24
|
+
EOL
|
25
|
+
}
|
26
|
+
|
27
|
+
sh "cpp -P lib/ruff/version.cpp.rb > lib/ruff/version.rb"
|
28
|
+
}
|
29
|
+
|
2
30
|
task :default => :spec
|
data/docs/Ruff.html
ADDED
@@ -0,0 +1,311 @@
|
|
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: Ruff
|
8
|
+
|
9
|
+
— Ruff 0.0.4 Documentation
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "Ruff";
|
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
|
+
|
41
|
+
|
42
|
+
<span class="title">Ruff</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: Ruff
|
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/ruff.rb<span class="defines">,<br />
|
82
|
+
lib/ruff/effect.rb,<br /> lib/ruff/handler.rb,<br /> lib/ruff/objects.rb,<br /> lib/ruff/version.rb</span>
|
83
|
+
</dd>
|
84
|
+
</dl>
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<h2>Defined Under Namespace</h2>
|
89
|
+
<p class="children">
|
90
|
+
|
91
|
+
|
92
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Ruff/Throws.html" title="Ruff::Throws (module)">Throws</a></span>
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Ruff/Effect.html" title="Ruff::Effect (class)">Effect</a></span>, <span class='object_link'><a href="Ruff/Handler.html" title="Ruff::Handler (class)">Handler</a></span>
|
97
|
+
|
98
|
+
|
99
|
+
</p>
|
100
|
+
|
101
|
+
|
102
|
+
<h2>
|
103
|
+
Constant Summary
|
104
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
105
|
+
</h2>
|
106
|
+
|
107
|
+
<dl class="constants">
|
108
|
+
|
109
|
+
<dt id="VERSION-constant" class="">VERSION =
|
110
|
+
|
111
|
+
</dt>
|
112
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.0.4</span><span class='tstring_end'>"</span></span></pre></dd>
|
113
|
+
|
114
|
+
</dl>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
<h2>
|
125
|
+
Class Method Summary
|
126
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
127
|
+
</h2>
|
128
|
+
|
129
|
+
<ul class="summary">
|
130
|
+
|
131
|
+
<li class="public ">
|
132
|
+
<span class="summary_signature">
|
133
|
+
|
134
|
+
<a href="#handler-class_method" title="handler (class method)">.<strong>handler</strong> ⇒ Object </a>
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
</span>
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
<span class="summary_desc"><div class='inline'><p>is alias for <code>Handler.new</code>.</p>
|
149
|
+
</div></span>
|
150
|
+
|
151
|
+
</li>
|
152
|
+
|
153
|
+
|
154
|
+
<li class="public ">
|
155
|
+
<span class="summary_signature">
|
156
|
+
|
157
|
+
<a href="#instance-class_method" title="instance (class method)">.<strong>instance</strong> ⇒ Object </a>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
</span>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<span class="summary_desc"><div class='inline'><p>is alias for <code>Effect.new</code>.</p>
|
172
|
+
</div></span>
|
173
|
+
|
174
|
+
</li>
|
175
|
+
|
176
|
+
|
177
|
+
</ul>
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
<div id="class_method_details" class="method_details_list">
|
183
|
+
<h2>Class Method Details</h2>
|
184
|
+
|
185
|
+
|
186
|
+
<div class="method_details first">
|
187
|
+
<h3 class="signature first" id="handler-class_method">
|
188
|
+
|
189
|
+
.<strong>handler</strong> ⇒ <tt>Object</tt>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
</h3><div class="docstring">
|
196
|
+
<div class="discussion">
|
197
|
+
<p>is alias for <code>Handler.new</code></p>
|
198
|
+
|
199
|
+
|
200
|
+
</div>
|
201
|
+
</div>
|
202
|
+
<div class="tags">
|
203
|
+
|
204
|
+
<div class="examples">
|
205
|
+
<p class="tag_title">Examples:</p>
|
206
|
+
|
207
|
+
|
208
|
+
<pre class="example code"><code><span class='id identifier rubyid_log_handler'>log_handler</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="Ruff (module)">Ruff</a></span></span><span class='period'>.</span><span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='const'>Log</span><span class='rparen'>)</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_msg'>msg</span><span class='comma'>,</span> <span class='id identifier rubyid_k'>k</span><span class='op'>|</span>
|
209
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Logger: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_msg'>msg</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
210
|
+
<span class='id identifier rubyid_k'>k</span><span class='lbracket'>[</span><span class='rbracket'>]</span>
|
211
|
+
<span class='rbrace'>}</span></code></pre>
|
212
|
+
|
213
|
+
</div>
|
214
|
+
|
215
|
+
|
216
|
+
<p class="tag_title">See Also:</p>
|
217
|
+
<ul class="see">
|
218
|
+
|
219
|
+
<li><span class='object_link'><a href="Ruff/Handler.html#initialize-instance_method" title="Ruff::Handler#initialize (method)">Handler.initialize</a></span></li>
|
220
|
+
|
221
|
+
</ul>
|
222
|
+
|
223
|
+
</div><table class="source_code">
|
224
|
+
<tr>
|
225
|
+
<td>
|
226
|
+
<pre class="lines">
|
227
|
+
|
228
|
+
|
229
|
+
26
|
230
|
+
27
|
231
|
+
28</pre>
|
232
|
+
</td>
|
233
|
+
<td>
|
234
|
+
<pre class="code"><span class="info file"># File 'lib/ruff.rb', line 26</span>
|
235
|
+
|
236
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_handler'>handler</span>
|
237
|
+
<span class='const'><span class='object_link'><a href="Ruff/Handler.html" title="Ruff::Handler (class)">Handler</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Ruff/Handler.html#initialize-instance_method" title="Ruff::Handler#initialize (method)">new</a></span></span>
|
238
|
+
<span class='kw'>end</span></pre>
|
239
|
+
</td>
|
240
|
+
</tr>
|
241
|
+
</table>
|
242
|
+
</div>
|
243
|
+
|
244
|
+
<div class="method_details ">
|
245
|
+
<h3 class="signature " id="instance-class_method">
|
246
|
+
|
247
|
+
.<strong>instance</strong> ⇒ <tt>Object</tt>
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
</h3><div class="docstring">
|
254
|
+
<div class="discussion">
|
255
|
+
<p>is alias for <code>Effect.new</code></p>
|
256
|
+
|
257
|
+
|
258
|
+
</div>
|
259
|
+
</div>
|
260
|
+
<div class="tags">
|
261
|
+
|
262
|
+
<div class="examples">
|
263
|
+
<p class="tag_title">Examples:</p>
|
264
|
+
|
265
|
+
|
266
|
+
<pre class="example code"><code><span class='const'>Log</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="Ruff (module)">Ruff</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span> <span class='comment'># === Ruff::Effect.new</span></code></pre>
|
267
|
+
|
268
|
+
</div>
|
269
|
+
|
270
|
+
|
271
|
+
<p class="tag_title">See Also:</p>
|
272
|
+
<ul class="see">
|
273
|
+
|
274
|
+
<li><span class='object_link'><a href="Ruff/Effect.html#initialize-instance_method" title="Ruff::Effect#initialize (method)">Effect.initialize</a></span></li>
|
275
|
+
|
276
|
+
</ul>
|
277
|
+
|
278
|
+
</div><table class="source_code">
|
279
|
+
<tr>
|
280
|
+
<td>
|
281
|
+
<pre class="lines">
|
282
|
+
|
283
|
+
|
284
|
+
14
|
285
|
+
15
|
286
|
+
16</pre>
|
287
|
+
</td>
|
288
|
+
<td>
|
289
|
+
<pre class="code"><span class="info file"># File 'lib/ruff.rb', line 14</span>
|
290
|
+
|
291
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_instance'>instance</span>
|
292
|
+
<span class='const'><span class='object_link'><a href="Ruff/Effect.html" title="Ruff::Effect (class)">Effect</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Ruff/Effect.html#initialize-instance_method" title="Ruff::Effect#initialize (method)">new</a></span></span>
|
293
|
+
<span class='kw'>end</span></pre>
|
294
|
+
</td>
|
295
|
+
</tr>
|
296
|
+
</table>
|
297
|
+
</div>
|
298
|
+
|
299
|
+
</div>
|
300
|
+
|
301
|
+
</div>
|
302
|
+
|
303
|
+
<div id="footer">
|
304
|
+
Generated on Wed Aug 14 22:29:58 2019 by
|
305
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
306
|
+
0.9.20 (ruby-2.6.3).
|
307
|
+
</div>
|
308
|
+
|
309
|
+
</div>
|
310
|
+
</body>
|
311
|
+
</html>
|
@@ -0,0 +1,414 @@
|
|
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: Ruff::Effect
|
8
|
+
|
9
|
+
— Ruff 0.0.4 Documentation
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "Ruff::Effect";
|
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 (E)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../Ruff.html" title="Ruff (module)">Ruff</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Effect</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: Ruff::Effect
|
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">Ruff::Effect</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<dl>
|
96
|
+
<dt>Defined in:</dt>
|
97
|
+
<dd>lib/ruff/effect.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
<p>This class provides an effect instance.</p>
|
105
|
+
|
106
|
+
|
107
|
+
</div>
|
108
|
+
</div>
|
109
|
+
<div class="tags">
|
110
|
+
|
111
|
+
|
112
|
+
</div>
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
117
|
+
<ul class="summary">
|
118
|
+
|
119
|
+
<li class="public ">
|
120
|
+
<span class="summary_signature">
|
121
|
+
|
122
|
+
<a href="#id-instance_method" title="#id (instance method)">#<strong>id</strong> ⇒ Object </a>
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
</span>
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
<span class="note title readonly">readonly</span>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
<span class="summary_desc"><div class='inline'><p>Each instance must be unique so they have unique id with UUID.</p>
|
142
|
+
</div></span>
|
143
|
+
|
144
|
+
</li>
|
145
|
+
|
146
|
+
|
147
|
+
</ul>
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
<h2>
|
154
|
+
Instance Method Summary
|
155
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
156
|
+
</h2>
|
157
|
+
|
158
|
+
<ul class="summary">
|
159
|
+
|
160
|
+
<li class="public ">
|
161
|
+
<span class="summary_signature">
|
162
|
+
|
163
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> ⇒ Effect<Arg, Ret> </a>
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
</span>
|
168
|
+
|
169
|
+
|
170
|
+
<span class="note title constructor">constructor</span>
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
<span class="summary_desc"><div class='inline'><p>instaciates an effect setting <code>id</code>.</p>
|
180
|
+
</div></span>
|
181
|
+
|
182
|
+
</li>
|
183
|
+
|
184
|
+
|
185
|
+
<li class="public ">
|
186
|
+
<span class="summary_signature">
|
187
|
+
|
188
|
+
<a href="#perform-instance_method" title="#perform (instance method)">#<strong>perform</strong>(*a) ⇒ Ret </a>
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
</span>
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
<span class="summary_desc"><div class='inline'><p>sends an effect ID and its arguments to a nearmost handler.</p>
|
203
|
+
</div></span>
|
204
|
+
|
205
|
+
</li>
|
206
|
+
|
207
|
+
|
208
|
+
</ul>
|
209
|
+
|
210
|
+
|
211
|
+
<div id="constructor_details" class="method_details_list">
|
212
|
+
<h2>Constructor Details</h2>
|
213
|
+
|
214
|
+
<div class="method_details first">
|
215
|
+
<h3 class="signature first" id="initialize-instance_method">
|
216
|
+
|
217
|
+
#<strong>initialize</strong> ⇒ <tt><span class='object_link'><a href="" title="Ruff::Effect (class)">Effect</a></span><Arg, Ret></tt>
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
</h3><div class="docstring">
|
224
|
+
<div class="discussion">
|
225
|
+
<p>instaciates an effect setting <code>id</code>.</p>
|
226
|
+
|
227
|
+
|
228
|
+
</div>
|
229
|
+
</div>
|
230
|
+
<div class="tags">
|
231
|
+
|
232
|
+
<div class="examples">
|
233
|
+
<p class="tag_title">Examples:</p>
|
234
|
+
|
235
|
+
|
236
|
+
<pre class="example code"><code><span class='const'>Log</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="Ruff::Effect (class)">Effect</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='comment'>#==> it _might_ be Effect<string, nil></span></code></pre>
|
237
|
+
|
238
|
+
</div>
|
239
|
+
|
240
|
+
|
241
|
+
</div><table class="source_code">
|
242
|
+
<tr>
|
243
|
+
<td>
|
244
|
+
<pre class="lines">
|
245
|
+
|
246
|
+
|
247
|
+
11
|
248
|
+
12
|
249
|
+
13
|
250
|
+
14</pre>
|
251
|
+
</td>
|
252
|
+
<td>
|
253
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/effect.rb', line 11</span>
|
254
|
+
|
255
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
256
|
+
<span class='ivar'>@id</span> <span class='op'>=</span> <span class='const'>SecureRandom</span><span class='period'>.</span><span class='id identifier rubyid_uuid'>uuid</span>
|
257
|
+
<span class='ivar'>@id</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span>
|
258
|
+
<span class='kw'>end</span></pre>
|
259
|
+
</td>
|
260
|
+
</tr>
|
261
|
+
</table>
|
262
|
+
</div>
|
263
|
+
|
264
|
+
</div>
|
265
|
+
|
266
|
+
<div id="instance_attr_details" class="attr_details">
|
267
|
+
<h2>Instance Attribute Details</h2>
|
268
|
+
|
269
|
+
|
270
|
+
<span id=""></span>
|
271
|
+
<div class="method_details first">
|
272
|
+
<h3 class="signature first" id="id-instance_method">
|
273
|
+
|
274
|
+
#<strong>id</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
</h3><div class="docstring">
|
281
|
+
<div class="discussion">
|
282
|
+
<p>Each instance must be unique so they have unique id with UUID</p>
|
283
|
+
|
284
|
+
|
285
|
+
</div>
|
286
|
+
</div>
|
287
|
+
<div class="tags">
|
288
|
+
|
289
|
+
|
290
|
+
</div><table class="source_code">
|
291
|
+
<tr>
|
292
|
+
<td>
|
293
|
+
<pre class="lines">
|
294
|
+
|
295
|
+
|
296
|
+
5
|
297
|
+
6
|
298
|
+
7</pre>
|
299
|
+
</td>
|
300
|
+
<td>
|
301
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/effect.rb', line 5</span>
|
302
|
+
|
303
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
|
304
|
+
<span class='ivar'>@id</span>
|
305
|
+
<span class='kw'>end</span></pre>
|
306
|
+
</td>
|
307
|
+
</tr>
|
308
|
+
</table>
|
309
|
+
</div>
|
310
|
+
|
311
|
+
</div>
|
312
|
+
|
313
|
+
|
314
|
+
<div id="instance_method_details" class="method_details_list">
|
315
|
+
<h2>Instance Method Details</h2>
|
316
|
+
|
317
|
+
|
318
|
+
<div class="method_details first">
|
319
|
+
<h3 class="signature first" id="perform-instance_method">
|
320
|
+
|
321
|
+
#<strong>perform</strong>(*a) ⇒ <tt>Ret</tt>
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
</h3><div class="docstring">
|
328
|
+
<div class="discussion">
|
329
|
+
<p>sends an effect ID and its arguments to a nearmost handler.</p>
|
330
|
+
|
331
|
+
|
332
|
+
</div>
|
333
|
+
</div>
|
334
|
+
<div class="tags">
|
335
|
+
|
336
|
+
<div class="examples">
|
337
|
+
<p class="tag_title">Examples:</p>
|
338
|
+
|
339
|
+
|
340
|
+
<pre class="example code"><code><span class='const'>Log</span><span class='period'>.</span><span class='id identifier rubyid_perform'>perform</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>hello</span><span class='tstring_end'>"</span></span></code></pre>
|
341
|
+
|
342
|
+
</div>
|
343
|
+
<p class="tag_title">Parameters:</p>
|
344
|
+
<ul class="param">
|
345
|
+
|
346
|
+
<li>
|
347
|
+
|
348
|
+
<span class='name'>a</span>
|
349
|
+
|
350
|
+
|
351
|
+
<span class='type'>(<tt>Arg</tt>)</span>
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
—
|
356
|
+
<div class='inline'><p>of the object <code>Effect<Arg, Ret></code></p>
|
357
|
+
</div>
|
358
|
+
|
359
|
+
</li>
|
360
|
+
|
361
|
+
</ul>
|
362
|
+
|
363
|
+
<p class="tag_title">Returns:</p>
|
364
|
+
<ul class="return">
|
365
|
+
|
366
|
+
<li>
|
367
|
+
|
368
|
+
|
369
|
+
<span class='type'>(<tt>Ret</tt>)</span>
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
—
|
374
|
+
<div class='inline'><p>of the object <code>Effect<Arg, Ret></code></p>
|
375
|
+
</div>
|
376
|
+
|
377
|
+
</li>
|
378
|
+
|
379
|
+
</ul>
|
380
|
+
|
381
|
+
</div><table class="source_code">
|
382
|
+
<tr>
|
383
|
+
<td>
|
384
|
+
<pre class="lines">
|
385
|
+
|
386
|
+
|
387
|
+
21
|
388
|
+
22
|
389
|
+
23</pre>
|
390
|
+
</td>
|
391
|
+
<td>
|
392
|
+
<pre class="code"><span class="info file"># File 'lib/ruff/effect.rb', line 21</span>
|
393
|
+
|
394
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_perform'>perform</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_a'>a</span><span class='rparen'>)</span>
|
395
|
+
<span class='kw'>return</span> <span class='const'>Fiber</span><span class='period'>.</span><span class='id identifier rubyid_yield'>yield</span> <span class='const'><span class='object_link'><a href="Throws.html" title="Ruff::Throws (module)">Throws</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Throws/Eff.html" title="Ruff::Throws::Eff (class)">Eff</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Throws/Eff.html#initialize-instance_method" title="Ruff::Throws::Eff#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='ivar'>@id</span><span class='comma'>,</span> <span class='id identifier rubyid_a'>a</span><span class='rparen'>)</span>
|
396
|
+
<span class='kw'>end</span></pre>
|
397
|
+
</td>
|
398
|
+
</tr>
|
399
|
+
</table>
|
400
|
+
</div>
|
401
|
+
|
402
|
+
</div>
|
403
|
+
|
404
|
+
</div>
|
405
|
+
|
406
|
+
<div id="footer">
|
407
|
+
Generated on Wed Aug 14 22:29:58 2019 by
|
408
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
409
|
+
0.9.20 (ruby-2.6.3).
|
410
|
+
</div>
|
411
|
+
|
412
|
+
</div>
|
413
|
+
</body>
|
414
|
+
</html>
|