lab419-config 0.1

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.
@@ -0,0 +1,429 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
+
8
+ <title>Class: Lab419::Config::Source</title>
9
+
10
+ <link rel="stylesheet" href="../../rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="../../js/jquery.js" type="text/javascript"
13
+ charset="utf-8"></script>
14
+ <script src="../../js/thickbox-compressed.js" type="text/javascript"
15
+ charset="utf-8"></script>
16
+ <script src="../../js/quicksearch.js" type="text/javascript"
17
+ charset="utf-8"></script>
18
+ <script src="../../js/darkfish.js" type="text/javascript"
19
+ charset="utf-8"></script>
20
+
21
+ </head>
22
+ <body class="class">
23
+
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="../../index.html">Home</a>
29
+ <a href="../../index.html#classes">Classes</a>
30
+ <a href="../../index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="file-metadata">
36
+ <div id="file-list-section" class="section">
37
+ <h3 class="section-header">In Files</h3>
38
+ <div class="section-body">
39
+ <ul>
40
+
41
+ <li><a href="../../lab419/config/source_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
+ class="thickbox" title="lab419/config/source.rb">lab419/config/source.rb</a></li>
43
+
44
+ </ul>
45
+ </div>
46
+ </div>
47
+
48
+
49
+ </div>
50
+
51
+ <div id="class-metadata">
52
+
53
+ <!-- Parent Class -->
54
+
55
+ <div id="parent-class-section" class="section">
56
+ <h3 class="section-header">Parent</h3>
57
+
58
+ <p class="link">Object</p>
59
+
60
+ </div>
61
+
62
+
63
+ <!-- Namespace Contents -->
64
+
65
+
66
+ <!-- Method Quickref -->
67
+
68
+ <div id="method-list-section" class="section">
69
+ <h3 class="section-header">Methods</h3>
70
+ <ul class="link-list">
71
+
72
+ <li><a href="#M000017">::new</a></li>
73
+
74
+ <li><a href="#M000012">#current</a></li>
75
+
76
+ <li><a href="#M000013">#eos?</a></li>
77
+
78
+ <li><a href="#M000014">#line_nb</a></li>
79
+
80
+ <li><a href="#M000015">#next</a></li>
81
+
82
+ <li><a href="#M000016">#to_debug</a></li>
83
+
84
+ </ul>
85
+ </div>
86
+
87
+
88
+ <!-- Included Modules -->
89
+
90
+ </div>
91
+
92
+ <div id="project-metadata">
93
+
94
+
95
+
96
+ <div id="classindex-section" class="section project-section">
97
+ <h3 class="section-header">Class Index
98
+ <span class="search-toggle"><img src="../../images/find.png"
99
+ height="16" width="16" alt="[+]"
100
+ title="show/hide quicksearch" /></span></h3>
101
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
102
+ <fieldset>
103
+ <legend>Quicksearch</legend>
104
+ <input type="text" name="quicksearch" value=""
105
+ class="quicksearch-field" />
106
+ </fieldset>
107
+ </form>
108
+
109
+ <ul class="link-list">
110
+
111
+ <li><a href="../../Lab419.html">Lab419</a></li>
112
+
113
+ <li><a href="../../Lab419/Config.html">Lab419::Config</a></li>
114
+
115
+ <li><a href="../../Lab419/Config/Data.html">Lab419::Config::Data</a></li>
116
+
117
+ <li><a href="../../Lab419/Config/Parser.html">Lab419::Config::Parser</a></li>
118
+
119
+ <li><a href="../../Lab419/Config/Reader.html">Lab419::Config::Reader</a></li>
120
+
121
+ <li><a href="../../Lab419/Config/Source.html">Lab419::Config::Source</a></li>
122
+
123
+ </ul>
124
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
125
+ </div>
126
+
127
+
128
+ </div>
129
+ </div>
130
+
131
+ <div id="documentation">
132
+ <h1 class="class">Lab419::Config::Source</h1>
133
+
134
+ <div id="description">
135
+ <p>
136
+ <a href="Source.html">Source</a> is a wrapper arround an array of lines,
137
+ adding the ability to store the current line_number <a
138
+ href="Source.html#M000014">line_nb</a> and the name of the source <a
139
+ href="Source.html#name">name</a>. It implements a minimal interface,
140
+ allowing to advance line by line via the <a
141
+ href="Source.html#M000015">next</a> method, accessing the current element
142
+ via <a href="Source.html#M000012">current</a> and testing for the end of
143
+ the array via the <a href="Source.html#M000013">eos?</a> method
144
+ </p>
145
+
146
+ </div>
147
+
148
+ <!-- Constants -->
149
+
150
+
151
+ <!-- Attributes -->
152
+
153
+ <div id="attribute-method-details" class="method-section section">
154
+ <h3 class="section-header">Attributes</h3>
155
+
156
+
157
+ <div id="name-attribute-method" class="method-detail">
158
+ <a name="name"></a>
159
+
160
+ <div class="method-heading attribute-method-heading">
161
+ <span class="method-name">name</span><span
162
+ class="attribute-access-type">[R]</span>
163
+ </div>
164
+
165
+ <div class="method-description">
166
+
167
+
168
+
169
+ </div>
170
+ </div>
171
+
172
+ </div>
173
+
174
+
175
+ <!-- Methods -->
176
+
177
+ <div id="public-class-method-details" class="method-section section">
178
+ <h3 class="section-header">Public Class Methods</h3>
179
+
180
+
181
+ <div id="new-method" class="method-detail ">
182
+ <a name="M000017"></a>
183
+
184
+ <div class="method-heading">
185
+
186
+ <span class="method-name">new</span><span
187
+ class="method-args">(lines, name=nil)</span>
188
+ <span class="method-click-advice">click to toggle source</span>
189
+
190
+ </div>
191
+
192
+ <div class="method-description">
193
+
194
+
195
+
196
+
197
+
198
+ <div class="method-source-code"
199
+ id="new-source">
200
+ <pre>
201
+ <span class="ruby-comment cmt"># File lab419/config/source.rb, line 50</span>
202
+ 50: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">lines</span>, <span class="ruby-identifier">name</span>=<span class="ruby-keyword kw">nil</span>
203
+ 51: <span class="ruby-ivar">@lines</span> = <span class="ruby-identifier">lines</span>
204
+ 52: <span class="ruby-ivar">@cursor</span> = <span class="ruby-value">0</span>
205
+ 53: <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span> <span class="ruby-operator">||</span> <span class="ruby-value str">&quot;&lt;annon&gt;&quot;</span>
206
+ 54: <span class="ruby-keyword kw">end</span></pre>
207
+ </div>
208
+
209
+ </div>
210
+
211
+
212
+
213
+
214
+ </div>
215
+
216
+
217
+ </div>
218
+
219
+ <div id="public-instance-method-details" class="method-section section">
220
+ <h3 class="section-header">Public Instance Methods</h3>
221
+
222
+
223
+ <div id="current-method" class="method-detail ">
224
+ <a name="M000012"></a>
225
+
226
+ <div class="method-heading">
227
+
228
+ <span class="method-name">current</span><span
229
+ class="method-args">()</span>
230
+ <span class="method-click-advice">click to toggle source</span>
231
+
232
+ </div>
233
+
234
+ <div class="method-description">
235
+
236
+ <p>
237
+ accesses the current element
238
+ </p>
239
+
240
+
241
+
242
+ <div class="method-source-code"
243
+ id="current-source">
244
+ <pre>
245
+ <span class="ruby-comment cmt"># File lab419/config/source.rb, line 21</span>
246
+ 21: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current</span>
247
+ 22: <span class="ruby-ivar">@lines</span>[ <span class="ruby-ivar">@cursor</span> ]
248
+ 23: <span class="ruby-keyword kw">end</span></pre>
249
+ </div>
250
+
251
+ </div>
252
+
253
+
254
+
255
+
256
+ </div>
257
+
258
+
259
+ <div id="eos--method" class="method-detail ">
260
+ <a name="M000013"></a>
261
+
262
+ <div class="method-heading">
263
+
264
+ <span class="method-name">eos?</span><span
265
+ class="method-args">()</span>
266
+ <span class="method-click-advice">click to toggle source</span>
267
+
268
+ </div>
269
+
270
+ <div class="method-description">
271
+
272
+ <p>
273
+ true iff <a href="Source.html#M000015">next</a> has advanced over the last
274
+ line
275
+ </p>
276
+
277
+
278
+
279
+ <div class="method-source-code"
280
+ id="eos--source">
281
+ <pre>
282
+ <span class="ruby-comment cmt"># File lab419/config/source.rb, line 26</span>
283
+ 26: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">eos?</span>
284
+ 27: <span class="ruby-ivar">@lines</span>[ <span class="ruby-ivar">@cursor</span> ].<span class="ruby-identifier">nil?</span>
285
+ 28: <span class="ruby-keyword kw">end</span></pre>
286
+ </div>
287
+
288
+ </div>
289
+
290
+
291
+
292
+
293
+ </div>
294
+
295
+
296
+ <div id="line-nb-method" class="method-detail ">
297
+ <a name="M000014"></a>
298
+
299
+ <div class="method-heading">
300
+
301
+ <span class="method-name">line_nb</span><span
302
+ class="method-args">()</span>
303
+ <span class="method-click-advice">click to toggle source</span>
304
+
305
+ </div>
306
+
307
+ <div class="method-description">
308
+
309
+ <p>
310
+ current line number, starting with 1, incremented by each call of <a
311
+ href="Source.html#M000015">next</a>, up to a maximum of the size of the
312
+ underlying array.
313
+ </p>
314
+
315
+
316
+
317
+ <div class="method-source-code"
318
+ id="line-nb-source">
319
+ <pre>
320
+ <span class="ruby-comment cmt"># File lab419/config/source.rb, line 33</span>
321
+ 33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">line_nb</span>
322
+ 34: [ <span class="ruby-ivar">@cursor</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>, <span class="ruby-ivar">@lines</span>.<span class="ruby-identifier">length</span> ].<span class="ruby-identifier">min</span>
323
+ 35: <span class="ruby-keyword kw">end</span></pre>
324
+ </div>
325
+
326
+ </div>
327
+
328
+
329
+
330
+
331
+ </div>
332
+
333
+
334
+ <div id="next-method" class="method-detail ">
335
+ <a name="M000015"></a>
336
+
337
+ <div class="method-heading">
338
+
339
+ <span class="method-name">next</span><span
340
+ class="method-args">()</span>
341
+ <span class="method-click-advice">click to toggle source</span>
342
+
343
+ </div>
344
+
345
+ <div class="method-description">
346
+
347
+ <p>
348
+ This is the <b>only</b> modifier of <a href="Source.html">Source</a>, it
349
+ advances to the next line of the underlying array. The operation is
350
+ irreversible.
351
+ </p>
352
+
353
+
354
+
355
+ <div class="method-source-code"
356
+ id="next-source">
357
+ <pre>
358
+ <span class="ruby-comment cmt"># File lab419/config/source.rb, line 40</span>
359
+ 40: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">next</span>
360
+ 41: <span class="ruby-identifier">current</span>.<span class="ruby-identifier">tap</span> <span class="ruby-keyword kw">do</span>
361
+ 42: <span class="ruby-ivar">@cursor</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
362
+ 43: <span class="ruby-keyword kw">end</span>
363
+ 44: <span class="ruby-keyword kw">end</span></pre>
364
+ </div>
365
+
366
+ </div>
367
+
368
+
369
+
370
+
371
+ </div>
372
+
373
+
374
+ <div id="to-debug-method" class="method-detail ">
375
+ <a name="M000016"></a>
376
+
377
+ <div class="method-heading">
378
+
379
+ <span class="method-name">to_debug</span><span
380
+ class="method-args">()</span>
381
+ <span class="method-click-advice">click to toggle source</span>
382
+
383
+ </div>
384
+
385
+ <div class="method-description">
386
+
387
+ <p>
388
+ nodoc
389
+ </p>
390
+
391
+
392
+
393
+ <div class="method-source-code"
394
+ id="to-debug-source">
395
+ <pre>
396
+ <span class="ruby-comment cmt"># File lab419/config/source.rb, line 47</span>
397
+ 47: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_debug</span>
398
+ 48: <span class="ruby-keyword kw">end</span></pre>
399
+ </div>
400
+
401
+ </div>
402
+
403
+
404
+
405
+
406
+ </div>
407
+
408
+
409
+ </div>
410
+
411
+
412
+ </div>
413
+
414
+
415
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
416
+
417
+ <p>Disabled; run with --debug to generate this.</p>
418
+
419
+ </div>
420
+
421
+ <div id="validator-badges">
422
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
423
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
424
+ Rdoc Generator</a> 1.1.6</small>.</p>
425
+ </div>
426
+
427
+ </body>
428
+ </html>
429
+
@@ -0,0 +1,6 @@
1
+ Sat, 22 May 2010 21:57:48 +0200
2
+ ./lab419/config/parser.rb Sat, 22 May 2010 21:56:57 +0200
3
+ ./lab419/config/data.rb Fri, 21 May 2010 16:02:46 +0200
4
+ ./lab419/config/source.rb Sat, 22 May 2010 21:57:46 +0200
5
+ ./lab419/config/reader.rb Sat, 22 May 2010 20:28:50 +0200
6
+ ./lab419/config.rb Fri, 21 May 2010 14:42:12 +0200
@@ -0,0 +1,115 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
6
+ <head>
7
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
8
+
9
+ <title>RDoc Documentation</title>
10
+
11
+ <link type="text/css" media="screen" href="rdoc.css" rel="stylesheet" />
12
+
13
+ <script src="js/jquery.js" type="text/javascript" charset="utf-8"></script>
14
+ <script src="js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
15
+ <script src="js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
16
+ <script src="js/darkfish.js" type="text/javascript" charset="utf-8"></script>
17
+
18
+ </head>
19
+ <body class="indexpage">
20
+
21
+
22
+ <h1>RDoc Documentation</h1>
23
+
24
+
25
+ <p>This is the API documentation for 'RDoc Documentation'.</p>
26
+
27
+
28
+
29
+
30
+
31
+ <h2 id="classes">Classes/Modules</h2>
32
+ <ul>
33
+
34
+ <li class="module"><a href="Lab419.html">Lab419</a></li>
35
+
36
+ <li class="module"><a href="Lab419/Config.html">Lab419::Config</a></li>
37
+
38
+ <li class="class"><a href="Lab419/Config/Data.html">Lab419::Config::Data</a></li>
39
+
40
+ <li class="module"><a href="Lab419/Config/Parser.html">Lab419::Config::Parser</a></li>
41
+
42
+ <li class="class"><a href="Lab419/Config/Reader.html">Lab419::Config::Reader</a></li>
43
+
44
+ <li class="class"><a href="Lab419/Config/Source.html">Lab419::Config::Source</a></li>
45
+
46
+ </ul>
47
+
48
+ <h2 id="methods">Methods</h2>
49
+ <ul>
50
+
51
+ <li><a href="Lab419/Config/Source.html#M000017">::new &mdash; Lab419::Config::Source</a></li>
52
+
53
+ <li><a href="Lab419/Config/Reader.html#M000024">::new &mdash; Lab419::Config::Reader</a></li>
54
+
55
+ <li><a href="Lab419/Config/Data.html#M000009">::new &mdash; Lab419::Config::Data</a></li>
56
+
57
+ <li><a href="Lab419/Config/Data.html#M000007">#[] &mdash; Lab419::Config::Data</a></li>
58
+
59
+ <li><a href="Lab419/Config/Data.html#M000008">#[]= &mdash; Lab419::Config::Data</a></li>
60
+
61
+ <li><a href="Lab419/Config/Parser.html#M000006">#check_source_setup &mdash; Lab419::Config::Parser</a></li>
62
+
63
+ <li><a href="Lab419/Config/Reader.html#M000022">#comment &mdash; Lab419::Config::Reader</a></li>
64
+
65
+ <li><a href="Lab419/Config/Source.html#M000012">#current &mdash; Lab419::Config::Source</a></li>
66
+
67
+ <li><a href="Lab419/Config/Parser.html#M000001">#default_handler &mdash; Lab419::Config::Parser</a></li>
68
+
69
+ <li><a href="Lab419/Config/Source.html#M000013">#eos? &mdash; Lab419::Config::Source</a></li>
70
+
71
+ <li><a href="Lab419/Config/Reader.html#M000019">#handle &mdash; Lab419::Config::Reader</a></li>
72
+
73
+ <li><a href="Lab419/Config/Reader.html#M000025">#init_handlers &mdash; Lab419::Config::Reader</a></li>
74
+
75
+ <li><a href="Lab419/Config/Reader.html#M000026">#init_source &mdash; Lab419::Config::Reader</a></li>
76
+
77
+ <li><a href="Lab419/Config/Parser.html#M000002">#invocation &mdash; Lab419::Config::Parser</a></li>
78
+
79
+ <li><a href="Lab419/Config/Source.html#M000014">#line_nb &mdash; Lab419::Config::Source</a></li>
80
+
81
+ <li><a href="Lab419/Config/Data.html#M000010">#method_missing &mdash; Lab419::Config::Data</a></li>
82
+
83
+ <li><a href="Lab419/Config/Source.html#M000015">#next &mdash; Lab419::Config::Source</a></li>
84
+
85
+ <li><a href="Lab419/Config/Parser.html#M000000">#parse &mdash; Lab419::Config::Parser</a></li>
86
+
87
+ <li><a href="Lab419/Config/Parser.html#M000003">#parse_array &mdash; Lab419::Config::Parser</a></li>
88
+
89
+ <li><a href="Lab419/Config/Parser.html#M000004">#parse_hash &mdash; Lab419::Config::Parser</a></li>
90
+
91
+ <li><a href="Lab419/Config/Parser.html#M000005">#parse_value &mdash; Lab419::Config::Parser</a></li>
92
+
93
+ <li><a href="Lab419/Config/Reader.html#M000018">#parsed? &mdash; Lab419::Config::Reader</a></li>
94
+
95
+ <li><a href="Lab419/Config/Reader.html#M000023">#separator_rgx &mdash; Lab419::Config::Reader</a></li>
96
+
97
+ <li><a href="Lab419/Config/Data.html#M000011">#store_value &mdash; Lab419::Config::Data</a></li>
98
+
99
+ <li><a href="Lab419/Config/Reader.html#M000027">#syntax_error &mdash; Lab419::Config::Reader</a></li>
100
+
101
+ <li><a href="Lab419/Config/Source.html#M000016">#to_debug &mdash; Lab419::Config::Source</a></li>
102
+
103
+ <li><a href="Lab419/Config/Reader.html#M000020">#with_file &mdash; Lab419::Config::Reader</a></li>
104
+
105
+ <li><a href="Lab419/Config/Reader.html#M000021">#with_string &mdash; Lab419::Config::Reader</a></li>
106
+
107
+ </ul>
108
+
109
+ <div id="validator-badges">
110
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
111
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
112
+ Rdoc Generator</a> 1.1.6</small>.</p>
113
+ </div>
114
+ </body>
115
+ </html>