devdnsd 1.1.10 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,421 @@
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: DevDNSd::Configuration
8
+
9
+ &mdash; Documentation by YARD 0.8.2.1
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" 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 (C)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../DevDNSd.html" title="DevDNSd (module)">DevDNSd</a></span></span>
36
+ &raquo;
37
+ <span class="title">Configuration</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: DevDNSd::Configuration
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">Bovem::Configuration</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Bovem::Configuration</li>
82
+
83
+ <li class="next">DevDNSd::Configuration</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/devdnsd/configuration.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+ <p>This class holds the configuration of the applicaton.</p>
107
+
108
+
109
+ </div>
110
+ </div>
111
+ <div class="tags">
112
+
113
+
114
+ </div>
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+ <h2>
123
+ Instance Method Summary
124
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
125
+ </h2>
126
+
127
+ <ul class="summary">
128
+
129
+ <li class="public ">
130
+ <span class="summary_signature">
131
+
132
+ <a href="#add_rule-instance_method" title="#add_rule (instance method)">- (Array) <strong>add_rule</strong>(*args, &amp;block) </a>
133
+
134
+
135
+
136
+ </span>
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+ <span class="summary_desc"><div class='inline'><p>Adds a rule to the configuration.</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)">- (Configuration) <strong>initialize</strong>(file = nil, overrides = {}, logger = nil) </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'><p>Creates a new configuration.</p>
172
+ </div></span>
173
+
174
+ </li>
175
+
176
+
177
+ </ul>
178
+
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
+ - (<tt><span class='object_link'><a href="" title="DevDNSd::Configuration (class)">Configuration</a></span></tt>) <strong>initialize</strong>(file = nil, overrides = {}, logger = nil)
188
+
189
+
190
+
191
+
192
+
193
+ </h3><div class="docstring">
194
+ <div class="discussion">
195
+ <p>Creates a new configuration.
196
+ A configuration file is a plain Ruby file with a top-level <span class='object_link'><a href="" title="DevDNSd::Configuration (class)">config</a></span> object.</p>
197
+
198
+ <p>Example:</p>
199
+
200
+ <pre class="code ruby"><code><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_add_rule'>add_rule</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>match.dev</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>10.0.0.1</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
201
+ </code></pre>
202
+
203
+
204
+ </div>
205
+ </div>
206
+ <div class="tags">
207
+ <p class="tag_title">Parameters:</p>
208
+ <ul class="param">
209
+
210
+ <li>
211
+
212
+ <span class='name'>file</span>
213
+
214
+
215
+ <span class='type'>(<tt>String</tt>)</span>
216
+
217
+
218
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
219
+
220
+
221
+ &mdash;
222
+ <div class='inline'><p>The file to read.</p>
223
+ </div>
224
+
225
+ </li>
226
+
227
+ <li>
228
+
229
+ <span class='name'>overrides</span>
230
+
231
+
232
+ <span class='type'>(<tt>Hash</tt>)</span>
233
+
234
+
235
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
236
+
237
+
238
+ &mdash;
239
+ <div class='inline'><p>A set of values which override those set in the configuration file.</p>
240
+ </div>
241
+
242
+ </li>
243
+
244
+ <li>
245
+
246
+ <span class='name'>logger</span>
247
+
248
+
249
+ <span class='type'>(<tt>Logger</tt>)</span>
250
+
251
+
252
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
253
+
254
+
255
+ &mdash;
256
+ <div class='inline'><p>The logger to use for notifications.</p>
257
+ </div>
258
+
259
+ </li>
260
+
261
+ </ul>
262
+
263
+
264
+ </div><table class="source_code">
265
+ <tr>
266
+ <td>
267
+ <pre class="lines">
268
+
269
+
270
+ 43
271
+ 44
272
+ 45
273
+ 46
274
+ 47
275
+ 48
276
+ 49
277
+ 50
278
+ 51
279
+ 52
280
+ 53
281
+ 54</pre>
282
+ </td>
283
+ <td>
284
+ <pre class="code"><span class="info file"># File 'lib/devdnsd/configuration.rb', line 43</span>
285
+
286
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_overrides'>overrides</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_logger'>logger</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
287
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='comma'>,</span> <span class='id identifier rubyid_overrides'>overrides</span><span class='comma'>,</span> <span class='id identifier rubyid_logger'>logger</span><span class='rparen'>)</span>
288
+
289
+ <span class='comment'># Make sure some arguments are of correct type
290
+ </span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_log_file'>log_file</span> <span class='op'>=</span> <span class='gvar'>$stdout</span> <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_log_file'>log_file</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>STDOUT</span><span class='tstring_end'>&quot;</span></span>
291
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_log_file'>log_file</span> <span class='op'>=</span> <span class='gvar'>$stderr</span> <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_log_file'>log_file</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>STDERR</span><span class='tstring_end'>&quot;</span></span>
292
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_port'>port</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_port'>port</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span>
293
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_log_level'>log_level</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_log_level'>log_level</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span>
294
+
295
+ <span class='comment'># Add a default rule
296
+ </span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_add_rule'>add_rule</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>.+</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>127.0.0.1</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_rules'>rules</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
297
+ <span class='kw'>end</span></pre>
298
+ </td>
299
+ </tr>
300
+ </table>
301
+ </div>
302
+
303
+ </div>
304
+
305
+
306
+ <div id="instance_method_details" class="method_details_list">
307
+ <h2>Instance Method Details</h2>
308
+
309
+
310
+ <div class="method_details first">
311
+ <h3 class="signature first" id="add_rule-instance_method">
312
+
313
+ - (<tt>Array</tt>) <strong>add_rule</strong>(*args, &amp;block)
314
+
315
+
316
+
317
+
318
+
319
+ </h3><div class="docstring">
320
+ <div class="discussion">
321
+ <p>Adds a rule to the configuration.</p>
322
+
323
+
324
+ </div>
325
+ </div>
326
+ <div class="tags">
327
+ <p class="tag_title">Parameters:</p>
328
+ <ul class="param">
329
+
330
+ <li>
331
+
332
+ <span class='name'>args</span>
333
+
334
+
335
+ <span class='type'>(<tt>Array</tt>)</span>
336
+
337
+
338
+
339
+ &mdash;
340
+ <div class='inline'><p>The rule&#39;s arguments.</p>
341
+ </div>
342
+
343
+ </li>
344
+
345
+ <li>
346
+
347
+ <span class='name'>block</span>
348
+
349
+
350
+ <span class='type'>(<tt>Proc</tt>)</span>
351
+
352
+
353
+
354
+ &mdash;
355
+ <div class='inline'><p>An optional block for the rule.</p>
356
+ </div>
357
+
358
+ </li>
359
+
360
+ </ul>
361
+
362
+ <p class="tag_title">Returns:</p>
363
+ <ul class="return">
364
+
365
+ <li>
366
+
367
+
368
+ <span class='type'>(<tt>Array</tt>)</span>
369
+
370
+
371
+
372
+ &mdash;
373
+ <div class='inline'><p>The current set of rule.</p>
374
+ </div>
375
+
376
+ </li>
377
+
378
+ </ul>
379
+
380
+ <p class="tag_title">See Also:</p>
381
+ <ul class="see">
382
+
383
+ <li><span class='object_link'><a href="Rule.html#create-class_method" title="DevDNSd::Rule.create (method)">Rule.create</a></span></li>
384
+
385
+ </ul>
386
+
387
+ </div><table class="source_code">
388
+ <tr>
389
+ <td>
390
+ <pre class="lines">
391
+
392
+
393
+ 62
394
+ 63
395
+ 64
396
+ 65</pre>
397
+ </td>
398
+ <td>
399
+ <pre class="code"><span class="info file"># File 'lib/devdnsd/configuration.rb', line 62</span>
400
+
401
+ <span class='kw'>def</span> <span class='id identifier rubyid_add_rule'>add_rule</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
402
+ <span class='ivar'>@rules</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
403
+ <span class='ivar'>@rules</span> <span class='op'>&lt;&lt;</span> <span class='const'>DevDNSd</span><span class='op'>::</span><span class='const'>Rule</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
404
+ <span class='kw'>end</span></pre>
405
+ </td>
406
+ </tr>
407
+ </table>
408
+ </div>
409
+
410
+ </div>
411
+
412
+ </div>
413
+
414
+ <div id="footer">
415
+ Generated on Wed Aug 22 13:48:32 2012 by
416
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
417
+ 0.8.2.1 (ruby-1.9.2).
418
+ </div>
419
+
420
+ </body>
421
+ </html>
@@ -0,0 +1,125 @@
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: DevDNSd::Errors
8
+
9
+ &mdash; Documentation by YARD 0.8.2.1
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" 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
+ <span class='title'><span class='object_link'><a href="../DevDNSd.html" title="DevDNSd (module)">DevDNSd</a></span></span>
36
+ &raquo;
37
+ <span class="title">Errors</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: DevDNSd::Errors
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/devdnsd/errors.rb</dd>
83
+
84
+ </dl>
85
+ <div class="clear"></div>
86
+
87
+ <h2>Overview</h2><div class="docstring">
88
+ <div class="discussion">
89
+ <p>Exceptions for <span class='object_link'><a href="../DevDNSd.html" title="DevDNSd (module)">DevDNSd</a></span>.</p>
90
+
91
+
92
+ </div>
93
+ </div>
94
+ <div class="tags">
95
+
96
+
97
+ </div><h2>Defined Under Namespace</h2>
98
+ <p class="children">
99
+
100
+
101
+
102
+
103
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Errors/InvalidRule.html" title="DevDNSd::Errors::InvalidRule (class)">InvalidRule</a></span>
104
+
105
+
106
+ </p>
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+ </div>
117
+
118
+ <div id="footer">
119
+ Generated on Wed Aug 22 13:48:31 2012 by
120
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
+ 0.8.2.1 (ruby-1.9.2).
122
+ </div>
123
+
124
+ </body>
125
+ </html>