shattered_machine 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +1 -0
- data/.yardoc/checksums +14 -0
- data/.yardoc/complete +0 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/Gemfile +8 -0
- data/LICENSE +9 -0
- data/README.md +51 -0
- data/doc/ShatteredMachine.html +135 -0
- data/doc/ShatteredMachine/Brush.html +375 -0
- data/doc/ShatteredMachine/ChangeByte.html +367 -0
- data/doc/ShatteredMachine/Converter.html +327 -0
- data/doc/ShatteredMachine/Defect.html +369 -0
- data/doc/ShatteredMachine/Exchange.html +373 -0
- data/doc/ShatteredMachine/Glitcher.html +365 -0
- data/doc/ShatteredMachine/Io.html +569 -0
- data/doc/ShatteredMachine/Io/Paths.html +310 -0
- data/doc/ShatteredMachine/PixelSorter.html +381 -0
- data/doc/ShatteredMachine/RustyEngine.html +111 -0
- data/doc/ShatteredMachine/Sampler.html +361 -0
- data/doc/ShatteredMachine/Slim.html +389 -0
- data/doc/ShatteredMachine/Transpose.html +369 -0
- data/doc/ShatteredMachine/WrongFilter.html +367 -0
- data/doc/_index.html +288 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +497 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +123 -0
- data/doc/js/app.js +314 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +275 -0
- data/doc/top-level-namespace.html +110 -0
- data/lib/rusty_engine/librusty_engine.dll +0 -0
- data/lib/rusty_engine/librusty_engine.dylib +0 -0
- data/lib/rusty_engine/librusty_engine.so +0 -0
- data/lib/rusty_engine/rusty_engine.rb +39 -0
- data/lib/shattered_machine.rb +11 -0
- data/lib/shattered_machine/brush.rb +28 -0
- data/lib/shattered_machine/change_byte.rb +41 -0
- data/lib/shattered_machine/converter.rb +20 -0
- data/lib/shattered_machine/defect.rb +38 -0
- data/lib/shattered_machine/exchange.rb +59 -0
- data/lib/shattered_machine/glitcher.rb +35 -0
- data/lib/shattered_machine/io.rb +74 -0
- data/lib/shattered_machine/pixel_sorter.rb +50 -0
- data/lib/shattered_machine/sampler.rb +100 -0
- data/lib/shattered_machine/slim.rb +55 -0
- data/lib/shattered_machine/transpose.rb +50 -0
- data/lib/shattered_machine/wrong_filter.rb +39 -0
- data/shattered_machine.gemspec +16 -0
- data/spec/brush_spec.rb +28 -0
- data/spec/change_byte_spec.rb +26 -0
- data/spec/converter_spec.rb +24 -0
- data/spec/defect_spec.rb +26 -0
- data/spec/exchange_spec.rb +26 -0
- data/spec/glitcher_spec.rb +26 -0
- data/spec/images/bar.PNG +0 -0
- data/spec/images/bar.jpeg +0 -0
- data/spec/images/foo.jpg +0 -0
- data/spec/images/foo.png +0 -0
- data/spec/images/fuzz.JPG +0 -0
- data/spec/images/pouet.JPEG +0 -0
- data/spec/io_spec.rb +74 -0
- data/spec/lib/rusty_engine_spec.rb +20 -0
- data/spec/pixel_sorter_spec.rb +26 -0
- data/spec/sampler_spec.rb +37 -0
- data/spec/slim_spec.rb +26 -0
- data/spec/spec_helper.rb +61 -0
- data/spec/transpose_spec.rb +26 -0
- data/spec/wrong_filter_spec.rb +26 -0
- metadata +147 -0
@@ -0,0 +1,365 @@
|
|
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: ShatteredMachine::Glitcher
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.26
|
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 = "ShatteredMachine::Glitcher";
|
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 (G)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../ShatteredMachine.html" title="ShatteredMachine (module)">ShatteredMachine</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Glitcher</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: ShatteredMachine::Glitcher
|
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">ShatteredMachine::Glitcher</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/shattered_machine/glitcher.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>Main class to call from glitching image.</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<h2>
|
122
|
+
Instance Method Summary
|
123
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
124
|
+
</h2>
|
125
|
+
|
126
|
+
<ul class="summary">
|
127
|
+
|
128
|
+
<li class="public ">
|
129
|
+
<span class="summary_signature">
|
130
|
+
|
131
|
+
<a href="#call-instance_method" title="#call (instance method)">#<strong>call</strong> ⇒ boolean </a>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
</span>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
<span class="summary_desc"><div class='inline'>
|
146
|
+
<p>Status of glitching.</p>
|
147
|
+
</div></span>
|
148
|
+
|
149
|
+
</li>
|
150
|
+
|
151
|
+
|
152
|
+
<li class="public ">
|
153
|
+
<span class="summary_signature">
|
154
|
+
|
155
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(glitch_library, io, options = {}) ⇒ Glitcher </a>
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
</span>
|
160
|
+
|
161
|
+
|
162
|
+
<span class="note title constructor">constructor</span>
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<span class="summary_desc"><div class='inline'>
|
172
|
+
<p>A new instance of Glitcher.</p>
|
173
|
+
</div></span>
|
174
|
+
|
175
|
+
</li>
|
176
|
+
|
177
|
+
|
178
|
+
</ul>
|
179
|
+
|
180
|
+
|
181
|
+
<div id="constructor_details" class="method_details_list">
|
182
|
+
<h2>Constructor Details</h2>
|
183
|
+
|
184
|
+
<div class="method_details first">
|
185
|
+
<h3 class="signature first" id="initialize-instance_method">
|
186
|
+
|
187
|
+
#<strong>initialize</strong>(glitch_library, io, options = {}) ⇒ <tt><span class='object_link'><a href="" title="ShatteredMachine::Glitcher (class)">Glitcher</a></span></tt>
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
</h3><div class="docstring">
|
194
|
+
<div class="discussion">
|
195
|
+
|
196
|
+
<p>Returns a new instance of Glitcher.</p>
|
197
|
+
|
198
|
+
|
199
|
+
</div>
|
200
|
+
</div>
|
201
|
+
<div class="tags">
|
202
|
+
<p class="tag_title">Parameters:</p>
|
203
|
+
<ul class="param">
|
204
|
+
|
205
|
+
<li>
|
206
|
+
|
207
|
+
<span class='name'>glitch_library</span>
|
208
|
+
|
209
|
+
|
210
|
+
<span class='type'>(<tt>string</tt>)</span>
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
—
|
215
|
+
<div class='inline'>
|
216
|
+
<p>Name of the library to call to glitch image</p>
|
217
|
+
</div>
|
218
|
+
|
219
|
+
</li>
|
220
|
+
|
221
|
+
<li>
|
222
|
+
|
223
|
+
<span class='name'>io</span>
|
224
|
+
|
225
|
+
|
226
|
+
<span class='type'>(<tt><span class='object_link'><a href="Io.html" title="ShatteredMachine::Io (class)">ShatteredMachine::Io</a></span></tt>)</span>
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
—
|
231
|
+
<div class='inline'>
|
232
|
+
<p>Io containing paths for images to glitch</p>
|
233
|
+
</div>
|
234
|
+
|
235
|
+
</li>
|
236
|
+
|
237
|
+
<li>
|
238
|
+
|
239
|
+
<span class='name'>options</span>
|
240
|
+
|
241
|
+
|
242
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
243
|
+
|
244
|
+
|
245
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
246
|
+
|
247
|
+
|
248
|
+
—
|
249
|
+
<div class='inline'>
|
250
|
+
<p>options for the glitch algorithm</p>
|
251
|
+
</div>
|
252
|
+
|
253
|
+
</li>
|
254
|
+
|
255
|
+
</ul>
|
256
|
+
|
257
|
+
|
258
|
+
</div><table class="source_code">
|
259
|
+
<tr>
|
260
|
+
<td>
|
261
|
+
<pre class="lines">
|
262
|
+
|
263
|
+
|
264
|
+
9
|
265
|
+
10
|
266
|
+
11
|
267
|
+
12
|
268
|
+
13</pre>
|
269
|
+
</td>
|
270
|
+
<td>
|
271
|
+
<pre class="code"><span class="info file"># File 'lib/shattered_machine/glitcher.rb', line 9</span>
|
272
|
+
|
273
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_glitch_library'>glitch_library</span><span class='comma'>,</span> <span class='id identifier rubyid_io'>io</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
274
|
+
<span class='ivar'>@glitch_library</span> <span class='op'>=</span> <span class='id identifier rubyid_glitch_library'>glitch_library</span>
|
275
|
+
<span class='ivar'>@io</span> <span class='op'>=</span> <span class='id identifier rubyid_io'>io</span>
|
276
|
+
<span class='ivar'>@options</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span>
|
277
|
+
<span class='kw'>end</span></pre>
|
278
|
+
</td>
|
279
|
+
</tr>
|
280
|
+
</table>
|
281
|
+
</div>
|
282
|
+
|
283
|
+
</div>
|
284
|
+
|
285
|
+
|
286
|
+
<div id="instance_method_details" class="method_details_list">
|
287
|
+
<h2>Instance Method Details</h2>
|
288
|
+
|
289
|
+
|
290
|
+
<div class="method_details first">
|
291
|
+
<h3 class="signature first" id="call-instance_method">
|
292
|
+
|
293
|
+
#<strong>call</strong> ⇒ <tt>boolean</tt>
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
</h3><div class="docstring">
|
300
|
+
<div class="discussion">
|
301
|
+
|
302
|
+
<p>Returns status of glitching.</p>
|
303
|
+
|
304
|
+
|
305
|
+
</div>
|
306
|
+
</div>
|
307
|
+
<div class="tags">
|
308
|
+
|
309
|
+
<p class="tag_title">Returns:</p>
|
310
|
+
<ul class="return">
|
311
|
+
|
312
|
+
<li>
|
313
|
+
|
314
|
+
|
315
|
+
<span class='type'>(<tt>boolean</tt>)</span>
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
—
|
320
|
+
<div class='inline'>
|
321
|
+
<p>status of glitching</p>
|
322
|
+
</div>
|
323
|
+
|
324
|
+
</li>
|
325
|
+
|
326
|
+
</ul>
|
327
|
+
|
328
|
+
</div><table class="source_code">
|
329
|
+
<tr>
|
330
|
+
<td>
|
331
|
+
<pre class="lines">
|
332
|
+
|
333
|
+
|
334
|
+
16
|
335
|
+
17
|
336
|
+
18
|
337
|
+
19
|
338
|
+
20</pre>
|
339
|
+
</td>
|
340
|
+
<td>
|
341
|
+
<pre class="code"><span class="info file"># File 'lib/shattered_machine/glitcher.rb', line 16</span>
|
342
|
+
|
343
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span>
|
344
|
+
<span class='ivar'>@io</span><span class='period'>.</span><span class='id identifier rubyid_png_images'>png_images</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_item'>item</span><span class='op'>|</span>
|
345
|
+
<span class='id identifier rubyid_create_glitch'>create_glitch</span><span class='lparen'>(</span><span class='id identifier rubyid_item'>item</span><span class='period'>.</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='id identifier rubyid_item'>item</span><span class='period'>.</span><span class='id identifier rubyid_output'>output</span><span class='rparen'>)</span>
|
346
|
+
<span class='kw'>end</span>
|
347
|
+
<span class='kw'>end</span></pre>
|
348
|
+
</td>
|
349
|
+
</tr>
|
350
|
+
</table>
|
351
|
+
</div>
|
352
|
+
|
353
|
+
</div>
|
354
|
+
|
355
|
+
</div>
|
356
|
+
|
357
|
+
<div id="footer">
|
358
|
+
Generated on Sun May 23 13:30:11 2021 by
|
359
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
360
|
+
0.9.26 (ruby-2.6.6).
|
361
|
+
</div>
|
362
|
+
|
363
|
+
</div>
|
364
|
+
</body>
|
365
|
+
</html>
|
@@ -0,0 +1,569 @@
|
|
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: ShatteredMachine::Io
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.26
|
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 = "ShatteredMachine::Io";
|
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 (I)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../ShatteredMachine.html" title="ShatteredMachine (module)">ShatteredMachine</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Io</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: ShatteredMachine::Io
|
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">ShatteredMachine::Io</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/shattered_machine/io.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>Find all png or jpg image in a given directory. Generate output filename that doesn't overwrite existing file.</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div><h2>Defined Under Namespace</h2>
|
114
|
+
<p class="children">
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Io/Paths.html" title="ShatteredMachine::Io::Paths (class)">Paths</a></span>
|
120
|
+
|
121
|
+
|
122
|
+
</p>
|
123
|
+
|
124
|
+
|
125
|
+
<h2>
|
126
|
+
Constant Summary
|
127
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
128
|
+
</h2>
|
129
|
+
|
130
|
+
<dl class="constants">
|
131
|
+
|
132
|
+
<dt id="PNG_EXTENSIONS-constant" class="">PNG_EXTENSIONS =
|
133
|
+
|
134
|
+
</dt>
|
135
|
+
<dd><pre class="code"><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.png</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.PNG</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
|
136
|
+
|
137
|
+
<dt id="JPG_EXTENSIONS-constant" class="">JPG_EXTENSIONS =
|
138
|
+
|
139
|
+
</dt>
|
140
|
+
<dd><pre class="code"><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.jpg</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.jpeg</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.JPG</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.JPEG</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
|
141
|
+
|
142
|
+
</dl>
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
149
|
+
<ul class="summary">
|
150
|
+
|
151
|
+
<li class="public ">
|
152
|
+
<span class="summary_signature">
|
153
|
+
|
154
|
+
<a href="#output_filename-instance_method" title="#output_filename (instance method)">#<strong>output_filename</strong> ⇒ Object </a>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
</span>
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<span class="summary_desc"><div class='inline'>
|
172
|
+
<p>Returns the value of attribute output_filename.</p>
|
173
|
+
</div></span>
|
174
|
+
|
175
|
+
</li>
|
176
|
+
|
177
|
+
|
178
|
+
</ul>
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
<h2>
|
185
|
+
Instance Method Summary
|
186
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
187
|
+
</h2>
|
188
|
+
|
189
|
+
<ul class="summary">
|
190
|
+
|
191
|
+
<li class="public ">
|
192
|
+
<span class="summary_signature">
|
193
|
+
|
194
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(input_path, output_folder, output_filename) ⇒ Io </a>
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
</span>
|
199
|
+
|
200
|
+
|
201
|
+
<span class="note title constructor">constructor</span>
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
<span class="summary_desc"><div class='inline'>
|
211
|
+
<p>A new instance of Io.</p>
|
212
|
+
</div></span>
|
213
|
+
|
214
|
+
</li>
|
215
|
+
|
216
|
+
|
217
|
+
<li class="public ">
|
218
|
+
<span class="summary_signature">
|
219
|
+
|
220
|
+
<a href="#jpg_images-instance_method" title="#jpg_images (instance method)">#<strong>jpg_images</strong> ⇒ Array<Paths> </a>
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
</span>
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
<span class="summary_desc"><div class='inline'>
|
235
|
+
<p>List of all jpg images in input_path.</p>
|
236
|
+
</div></span>
|
237
|
+
|
238
|
+
</li>
|
239
|
+
|
240
|
+
|
241
|
+
<li class="public ">
|
242
|
+
<span class="summary_signature">
|
243
|
+
|
244
|
+
<a href="#png_images-instance_method" title="#png_images (instance method)">#<strong>png_images</strong> ⇒ Array<Paths> </a>
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
</span>
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
<span class="summary_desc"><div class='inline'>
|
259
|
+
<p>List of all png images in input_path.</p>
|
260
|
+
</div></span>
|
261
|
+
|
262
|
+
</li>
|
263
|
+
|
264
|
+
|
265
|
+
</ul>
|
266
|
+
|
267
|
+
|
268
|
+
<div id="constructor_details" class="method_details_list">
|
269
|
+
<h2>Constructor Details</h2>
|
270
|
+
|
271
|
+
<div class="method_details first">
|
272
|
+
<h3 class="signature first" id="initialize-instance_method">
|
273
|
+
|
274
|
+
#<strong>initialize</strong>(input_path, output_folder, output_filename) ⇒ <tt><span class='object_link'><a href="" title="ShatteredMachine::Io (class)">Io</a></span></tt>
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
</h3><div class="docstring">
|
281
|
+
<div class="discussion">
|
282
|
+
|
283
|
+
<p>Returns a new instance of Io.</p>
|
284
|
+
|
285
|
+
|
286
|
+
</div>
|
287
|
+
</div>
|
288
|
+
<div class="tags">
|
289
|
+
<p class="tag_title">Parameters:</p>
|
290
|
+
<ul class="param">
|
291
|
+
|
292
|
+
<li>
|
293
|
+
|
294
|
+
<span class='name'>input_path</span>
|
295
|
+
|
296
|
+
|
297
|
+
<span class='type'>(<tt>string</tt>)</span>
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
—
|
302
|
+
<div class='inline'>
|
303
|
+
<p>input file or directory</p>
|
304
|
+
</div>
|
305
|
+
|
306
|
+
</li>
|
307
|
+
|
308
|
+
<li>
|
309
|
+
|
310
|
+
<span class='name'>output_folder</span>
|
311
|
+
|
312
|
+
|
313
|
+
<span class='type'>(<tt>string</tt>)</span>
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
—
|
318
|
+
<div class='inline'>
|
319
|
+
<p>output directory</p>
|
320
|
+
</div>
|
321
|
+
|
322
|
+
</li>
|
323
|
+
|
324
|
+
<li>
|
325
|
+
|
326
|
+
<span class='name'>output_filename</span>
|
327
|
+
|
328
|
+
|
329
|
+
<span class='type'>(<tt>string</tt>)</span>
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
—
|
334
|
+
<div class='inline'>
|
335
|
+
<p>output file name</p>
|
336
|
+
</div>
|
337
|
+
|
338
|
+
</li>
|
339
|
+
|
340
|
+
</ul>
|
341
|
+
|
342
|
+
|
343
|
+
</div><table class="source_code">
|
344
|
+
<tr>
|
345
|
+
<td>
|
346
|
+
<pre class="lines">
|
347
|
+
|
348
|
+
|
349
|
+
16
|
350
|
+
17
|
351
|
+
18
|
352
|
+
19
|
353
|
+
20</pre>
|
354
|
+
</td>
|
355
|
+
<td>
|
356
|
+
<pre class="code"><span class="info file"># File 'lib/shattered_machine/io.rb', line 16</span>
|
357
|
+
|
358
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_input_path'>input_path</span><span class='comma'>,</span> <span class='id identifier rubyid_output_folder'>output_folder</span><span class='comma'>,</span> <span class='id identifier rubyid_output_filename'>output_filename</span><span class='rparen'>)</span>
|
359
|
+
<span class='ivar'>@input_path</span> <span class='op'>=</span> <span class='id identifier rubyid_input_path'>input_path</span>
|
360
|
+
<span class='ivar'>@output_folder</span> <span class='op'>=</span> <span class='id identifier rubyid_output_folder'>output_folder</span>
|
361
|
+
<span class='ivar'>@output_filename</span> <span class='op'>=</span> <span class='id identifier rubyid_output_filename'>output_filename</span>
|
362
|
+
<span class='kw'>end</span></pre>
|
363
|
+
</td>
|
364
|
+
</tr>
|
365
|
+
</table>
|
366
|
+
</div>
|
367
|
+
|
368
|
+
</div>
|
369
|
+
|
370
|
+
<div id="instance_attr_details" class="attr_details">
|
371
|
+
<h2>Instance Attribute Details</h2>
|
372
|
+
|
373
|
+
|
374
|
+
<span id="output_filename=-instance_method"></span>
|
375
|
+
<div class="method_details first">
|
376
|
+
<h3 class="signature first" id="output_filename-instance_method">
|
377
|
+
|
378
|
+
#<strong>output_filename</strong> ⇒ <tt>Object</tt>
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
</h3><div class="docstring">
|
385
|
+
<div class="discussion">
|
386
|
+
|
387
|
+
<p>Returns the value of attribute output_filename.</p>
|
388
|
+
|
389
|
+
|
390
|
+
</div>
|
391
|
+
</div>
|
392
|
+
<div class="tags">
|
393
|
+
|
394
|
+
|
395
|
+
</div><table class="source_code">
|
396
|
+
<tr>
|
397
|
+
<td>
|
398
|
+
<pre class="lines">
|
399
|
+
|
400
|
+
|
401
|
+
7
|
402
|
+
8
|
403
|
+
9</pre>
|
404
|
+
</td>
|
405
|
+
<td>
|
406
|
+
<pre class="code"><span class="info file"># File 'lib/shattered_machine/io.rb', line 7</span>
|
407
|
+
|
408
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_output_filename'>output_filename</span>
|
409
|
+
<span class='ivar'>@output_filename</span>
|
410
|
+
<span class='kw'>end</span></pre>
|
411
|
+
</td>
|
412
|
+
</tr>
|
413
|
+
</table>
|
414
|
+
</div>
|
415
|
+
|
416
|
+
</div>
|
417
|
+
|
418
|
+
|
419
|
+
<div id="instance_method_details" class="method_details_list">
|
420
|
+
<h2>Instance Method Details</h2>
|
421
|
+
|
422
|
+
|
423
|
+
<div class="method_details first">
|
424
|
+
<h3 class="signature first" id="jpg_images-instance_method">
|
425
|
+
|
426
|
+
#<strong>jpg_images</strong> ⇒ <tt>Array<<span class='object_link'><a href="Io/Paths.html" title="ShatteredMachine::Io::Paths (class)">Paths</a></span>></tt>
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
</h3><div class="docstring">
|
433
|
+
<div class="discussion">
|
434
|
+
|
435
|
+
<p>Returns list of all jpg images in input_path.</p>
|
436
|
+
|
437
|
+
|
438
|
+
</div>
|
439
|
+
</div>
|
440
|
+
<div class="tags">
|
441
|
+
|
442
|
+
<p class="tag_title">Returns:</p>
|
443
|
+
<ul class="return">
|
444
|
+
|
445
|
+
<li>
|
446
|
+
|
447
|
+
|
448
|
+
<span class='type'>(<tt>Array<<span class='object_link'><a href="Io/Paths.html" title="ShatteredMachine::Io::Paths (class)">Paths</a></span>></tt>)</span>
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
—
|
453
|
+
<div class='inline'>
|
454
|
+
<p>list of all jpg images in input_path</p>
|
455
|
+
</div>
|
456
|
+
|
457
|
+
</li>
|
458
|
+
|
459
|
+
</ul>
|
460
|
+
|
461
|
+
</div><table class="source_code">
|
462
|
+
<tr>
|
463
|
+
<td>
|
464
|
+
<pre class="lines">
|
465
|
+
|
466
|
+
|
467
|
+
32
|
468
|
+
33
|
469
|
+
34
|
470
|
+
35
|
471
|
+
36
|
472
|
+
37
|
473
|
+
38</pre>
|
474
|
+
</td>
|
475
|
+
<td>
|
476
|
+
<pre class="code"><span class="info file"># File 'lib/shattered_machine/io.rb', line 32</span>
|
477
|
+
|
478
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_jpg_images'>jpg_images</span>
|
479
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_single_image_io'>single_image_io</span> <span class='kw'>if</span> <span class='id identifier rubyid_extension_included?'>extension_included?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="#JPG_EXTENSIONS-constant" title="ShatteredMachine::Io::JPG_EXTENSIONS (constant)">JPG_EXTENSIONS</a></span></span><span class='comma'>,</span> <span class='ivar'>@input_path</span><span class='rparen'>)</span>
|
480
|
+
|
481
|
+
<span class='id identifier rubyid_images_in_directory'>images_in_directory</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="#JPG_EXTENSIONS-constant" title="ShatteredMachine::Io::JPG_EXTENSIONS (constant)">JPG_EXTENSIONS</a></span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_img'>img</span><span class='op'>|</span>
|
482
|
+
<span class='const'><span class='object_link'><a href="Io/Paths.html" title="ShatteredMachine::Io::Paths (class)">Paths</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="ShatteredMachine::Io#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='ivar'>@input_path</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_img'>img</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_generate_output_filename'>generate_output_filename</span><span class='lparen'>(</span><span class='id identifier rubyid_img'>img</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
483
|
+
<span class='kw'>end</span>
|
484
|
+
<span class='kw'>end</span></pre>
|
485
|
+
</td>
|
486
|
+
</tr>
|
487
|
+
</table>
|
488
|
+
</div>
|
489
|
+
|
490
|
+
<div class="method_details ">
|
491
|
+
<h3 class="signature " id="png_images-instance_method">
|
492
|
+
|
493
|
+
#<strong>png_images</strong> ⇒ <tt>Array<<span class='object_link'><a href="Io/Paths.html" title="ShatteredMachine::Io::Paths (class)">Paths</a></span>></tt>
|
494
|
+
|
495
|
+
|
496
|
+
|
497
|
+
|
498
|
+
|
499
|
+
</h3><div class="docstring">
|
500
|
+
<div class="discussion">
|
501
|
+
|
502
|
+
<p>Returns list of all png images in input_path.</p>
|
503
|
+
|
504
|
+
|
505
|
+
</div>
|
506
|
+
</div>
|
507
|
+
<div class="tags">
|
508
|
+
|
509
|
+
<p class="tag_title">Returns:</p>
|
510
|
+
<ul class="return">
|
511
|
+
|
512
|
+
<li>
|
513
|
+
|
514
|
+
|
515
|
+
<span class='type'>(<tt>Array<<span class='object_link'><a href="Io/Paths.html" title="ShatteredMachine::Io::Paths (class)">Paths</a></span>></tt>)</span>
|
516
|
+
|
517
|
+
|
518
|
+
|
519
|
+
—
|
520
|
+
<div class='inline'>
|
521
|
+
<p>list of all png images in input_path</p>
|
522
|
+
</div>
|
523
|
+
|
524
|
+
</li>
|
525
|
+
|
526
|
+
</ul>
|
527
|
+
|
528
|
+
</div><table class="source_code">
|
529
|
+
<tr>
|
530
|
+
<td>
|
531
|
+
<pre class="lines">
|
532
|
+
|
533
|
+
|
534
|
+
23
|
535
|
+
24
|
536
|
+
25
|
537
|
+
26
|
538
|
+
27
|
539
|
+
28
|
540
|
+
29</pre>
|
541
|
+
</td>
|
542
|
+
<td>
|
543
|
+
<pre class="code"><span class="info file"># File 'lib/shattered_machine/io.rb', line 23</span>
|
544
|
+
|
545
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_png_images'>png_images</span>
|
546
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_single_image_io'>single_image_io</span> <span class='kw'>if</span> <span class='id identifier rubyid_extension_included?'>extension_included?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="#PNG_EXTENSIONS-constant" title="ShatteredMachine::Io::PNG_EXTENSIONS (constant)">PNG_EXTENSIONS</a></span></span><span class='comma'>,</span> <span class='ivar'>@input_path</span><span class='rparen'>)</span>
|
547
|
+
|
548
|
+
<span class='id identifier rubyid_images_in_directory'>images_in_directory</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="#PNG_EXTENSIONS-constant" title="ShatteredMachine::Io::PNG_EXTENSIONS (constant)">PNG_EXTENSIONS</a></span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_img'>img</span><span class='op'>|</span>
|
549
|
+
<span class='const'><span class='object_link'><a href="Io/Paths.html" title="ShatteredMachine::Io::Paths (class)">Paths</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="ShatteredMachine::Io#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='ivar'>@input_path</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_img'>img</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_generate_output_filename'>generate_output_filename</span><span class='lparen'>(</span><span class='id identifier rubyid_img'>img</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
550
|
+
<span class='kw'>end</span>
|
551
|
+
<span class='kw'>end</span></pre>
|
552
|
+
</td>
|
553
|
+
</tr>
|
554
|
+
</table>
|
555
|
+
</div>
|
556
|
+
|
557
|
+
</div>
|
558
|
+
|
559
|
+
</div>
|
560
|
+
|
561
|
+
<div id="footer">
|
562
|
+
Generated on Sun May 23 13:30:11 2021 by
|
563
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
564
|
+
0.9.26 (ruby-2.6.6).
|
565
|
+
</div>
|
566
|
+
|
567
|
+
</div>
|
568
|
+
</body>
|
569
|
+
</html>
|