mucgly 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,305 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: EasyFile::WriteStack
8
+
9
+ &mdash; Documentation by YARD 0.8.6.1
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
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (W)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../EasyFile.html" title="EasyFile (module)">EasyFile</a></span></span>
36
+ &raquo;
37
+ <span class="title">WriteStack</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: EasyFile::WriteStack
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">EasyFile::WriteStack</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+ <dt class="r2">Includes:</dt>
94
+ <dd class="r2"><span class='object_link'><a href="Stacked.html" title="EasyFile::Stacked (module)">Stacked</a></span></dd>
95
+
96
+
97
+
98
+
99
+
100
+ <dt class="r1 last">Defined in:</dt>
101
+ <dd class="r1 last">lib/easyfile.rb</dd>
102
+
103
+ </dl>
104
+ <div class="clear"></div>
105
+
106
+ <h2>Overview</h2><div class="docstring">
107
+ <div class="discussion">
108
+
109
+ <p>Stack of Write files.</p>
110
+
111
+
112
+ </div>
113
+ </div>
114
+ <div class="tags">
115
+
116
+
117
+ </div>
118
+
119
+
120
+
121
+
122
+
123
+ <h2>Instance Attribute Summary</h2>
124
+
125
+ <h3 class="inherited">Attributes included from <span class='object_link'><a href="Stacked.html" title="EasyFile::Stacked (module)">Stacked</a></span></h3>
126
+ <p class="inherited"><span class='object_link'><a href="Stacked.html#stack-instance_method" title="EasyFile::Stacked#stack (method)">#stack</a></span></p>
127
+
128
+
129
+
130
+ <h2>
131
+ Instance Method Summary
132
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
133
+ </h2>
134
+
135
+ <ul class="summary">
136
+
137
+ <li class="public ">
138
+ <span class="summary_signature">
139
+
140
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (WriteStack) <strong>initialize</strong>(name) </a>
141
+
142
+
143
+
144
+ </span>
145
+
146
+
147
+ <span class="note title constructor">constructor</span>
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+ <span class="summary_desc"><div class='inline'>
157
+ <p>A new instance of WriteStack.</p>
158
+ </div></span>
159
+
160
+ </li>
161
+
162
+
163
+ <li class="public ">
164
+ <span class="summary_signature">
165
+
166
+ <a href="#push-instance_method" title="#push (instance method)">- (Object) <strong>push</strong>(name) </a>
167
+
168
+
169
+
170
+ </span>
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+ <span class="summary_desc"><div class='inline'></div></span>
181
+
182
+ </li>
183
+
184
+
185
+ </ul>
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="Stacked.html" title="EasyFile::Stacked (module)">Stacked</a></span></h3>
198
+ <p class="inherited"><span class='object_link'><a href="Stacked.html#method_missing-instance_method" title="EasyFile::Stacked#method_missing (method)">#method_missing</a></span>, <span class='object_link'><a href="Stacked.html#pop-instance_method" title="EasyFile::Stacked#pop (method)">#pop</a></span>, <span class='object_link'><a href="Stacked.html#setup-instance_method" title="EasyFile::Stacked#setup (method)">#setup</a></span></p>
199
+ <div id="constructor_details" class="method_details_list">
200
+ <h2>Constructor Details</h2>
201
+
202
+ <div class="method_details first">
203
+ <h3 class="signature first" id="initialize-instance_method">
204
+
205
+ - (<tt><span class='object_link'><a href="" title="EasyFile::WriteStack (class)">WriteStack</a></span></tt>) <strong>initialize</strong>(name)
206
+
207
+
208
+
209
+
210
+
211
+ </h3><div class="docstring">
212
+ <div class="discussion">
213
+
214
+ <p>A new instance of WriteStack</p>
215
+
216
+
217
+ </div>
218
+ </div>
219
+ <div class="tags">
220
+
221
+
222
+ </div><table class="source_code">
223
+ <tr>
224
+ <td>
225
+ <pre class="lines">
226
+
227
+
228
+ 708
229
+ 709
230
+ 710
231
+ 711</pre>
232
+ </td>
233
+ <td>
234
+ <pre class="code"><span class="info file"># File 'lib/easyfile.rb', line 708</span>
235
+
236
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span> <span class='id identifier rubyid_name'>name</span> <span class='rparen'>)</span>
237
+ <span class='id identifier rubyid_io'>io</span> <span class='op'>=</span> <span class='const'>InOut</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='symbol'>:write</span> <span class='rparen'>)</span>
238
+ <span class='id identifier rubyid_setup'>setup</span><span class='lparen'>(</span> <span class='id identifier rubyid_io'>io</span> <span class='rparen'>)</span>
239
+ <span class='kw'>end</span></pre>
240
+ </td>
241
+ </tr>
242
+ </table>
243
+ </div>
244
+
245
+ </div>
246
+ <div id="method_missing_details" class="method_details_list">
247
+ <h2>Dynamic Method Handling</h2>
248
+ <p class="notice super">
249
+ This class handles dynamic methods through the <tt>method_missing</tt> method
250
+
251
+ in the class <span class='object_link'><a href="Stacked.html#method_missing-instance_method" title="EasyFile::Stacked#method_missing (method)">EasyFile::Stacked</a></span>
252
+
253
+ </p>
254
+
255
+ </div>
256
+
257
+
258
+ <div id="instance_method_details" class="method_details_list">
259
+ <h2>Instance Method Details</h2>
260
+
261
+
262
+ <div class="method_details first">
263
+ <h3 class="signature first" id="push-instance_method">
264
+
265
+ - (<tt>Object</tt>) <strong>push</strong>(name)
266
+
267
+
268
+
269
+
270
+
271
+ </h3><table class="source_code">
272
+ <tr>
273
+ <td>
274
+ <pre class="lines">
275
+
276
+
277
+ 713
278
+ 714
279
+ 715
280
+ 716</pre>
281
+ </td>
282
+ <td>
283
+ <pre class="code"><span class="info file"># File 'lib/easyfile.rb', line 713</span>
284
+
285
+ <span class='kw'>def</span> <span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span> <span class='id identifier rubyid_name'>name</span> <span class='rparen'>)</span>
286
+ <span class='id identifier rubyid_io'>io</span> <span class='op'>=</span> <span class='const'>InOut</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='symbol'>:write</span> <span class='rparen'>)</span>
287
+ <span class='ivar'>@stack</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span> <span class='id identifier rubyid_io'>io</span>
288
+ <span class='kw'>end</span></pre>
289
+ </td>
290
+ </tr>
291
+ </table>
292
+ </div>
293
+
294
+ </div>
295
+
296
+ </div>
297
+
298
+ <div id="footer">
299
+ Generated on Wed Jan 15 19:29:45 2014 by
300
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
301
+ 0.8.6.1 (ruby-1.9.3).
302
+ </div>
303
+
304
+ </body>
305
+ </html>
data/doc/EasyFile.html ADDED
@@ -0,0 +1,155 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: EasyFile
8
+
9
+ &mdash; Documentation by YARD 0.8.6.1
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
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '';
20
+ framesUrl = "frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="_index.html">Index (E)</a> &raquo;
35
+
36
+
37
+ <span class="title">EasyFile</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: EasyFile
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/easyfile.rb</dd>
83
+
84
+ </dl>
85
+ <div class="clear"></div>
86
+
87
+ <h2>Overview</h2><div class="docstring">
88
+ <div class="discussion">
89
+
90
+ <p>EasyFile module provides simplified file access management. The user can
91
+ refer all files by name, also the standard streams (STDIN, STDOUT, STDERR).
92
+ File names are unique since they are stored as absolute path names. Also
93
+ short names (relative/original) can be used.</p>
94
+
95
+ <p>The files are divided to Read and Write files. This simplifies the file
96
+ handling. Both files maintain the current line number.</p>
97
+
98
+ <p>Read files has put-back feature. Arbitrary number of chars can be put back
99
+ to stream. This is helpful for parsers that has to perform look-ahead.</p>
100
+
101
+ <p>Write file have redirection support. Write file can be split into two
102
+ physical files if output requires copying to two or more files. Two (or
103
+ more ) Write files can also be joined, i.e. all writes are directed to the
104
+ joined file. Stream output can be suppressed.</p>
105
+
106
+ <p>Examples:</p>
107
+
108
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_f'>f</span> <span class='op'>=</span> <span class='const'>EasyFile</span><span class='op'>::</span><span class='const'>Read</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>myfile</span><span class='tstring_end'>'</span></span> <span class='rparen'>)</span>
109
+ <span class='id identifier rubyid_c'>c</span> <span class='op'>=</span> <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_getc'>getc</span>
110
+ <span class='kw'>if</span> <span class='id identifier rubyid_c'>c</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>#</span><span class='tstring_end'>&quot;</span></span>
111
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Error in </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_absname'>absname</span><span class='rbrace'>}</span><span class='tstring_content'> on line </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_line'>line</span><span class='op'>+</span><span class='int'>1</span><span class='rbrace'>}</span><span class='tstring_content'>: can't have '#' as first char...</span><span class='tstring_end'>&quot;</span></span>
112
+ <span class='kw'>end</span>
113
+
114
+ <span class='id identifier rubyid_f'>f</span> <span class='op'>=</span> <span class='const'>EasyFile</span><span class='op'>::</span><span class='const'>Write</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>myfile</span><span class='tstring_end'>'</span></span> <span class='rparen'>)</span>
115
+ <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_branch'>branch</span><span class='lparen'>(</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>myfile2</span><span class='tstring_end'>'</span></span> <span class='rparen'>)</span>
116
+ <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>foo\nbar\ndii</span><span class='tstring_end'>&quot;</span></span>
117
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Number of lines output to 'myfile' and 'myfile2': </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_line'>line</span><span class='rbrace'>}</span><span class='tstring_content'>...</span><span class='tstring_end'>&quot;</span></span></code></pre>
118
+
119
+
120
+ </div>
121
+ </div>
122
+ <div class="tags">
123
+
124
+
125
+ </div><h2>Defined Under Namespace</h2>
126
+ <p class="children">
127
+
128
+
129
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="EasyFile/Stacked.html" title="EasyFile::Stacked (module)">Stacked</a></span>
130
+
131
+
132
+
133
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="EasyFile/InOut.html" title="EasyFile::InOut (class)">InOut</a></span>, <span class='object_link'><a href="EasyFile/Read.html" title="EasyFile::Read (class)">Read</a></span>, <span class='object_link'><a href="EasyFile/ReadStack.html" title="EasyFile::ReadStack (class)">ReadStack</a></span>, <span class='object_link'><a href="EasyFile/String.html" title="EasyFile::String (class)">String</a></span>, <span class='object_link'><a href="EasyFile/Write.html" title="EasyFile::Write (class)">Write</a></span>, <span class='object_link'><a href="EasyFile/WriteStack.html" title="EasyFile::WriteStack (class)">WriteStack</a></span>
134
+
135
+
136
+ </p>
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+ </div>
147
+
148
+ <div id="footer">
149
+ Generated on Wed Jan 15 19:29:44 2014 by
150
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
151
+ 0.8.6.1 (ruby-1.9.3).
152
+ </div>
153
+
154
+ </body>
155
+ </html>