doc/DevDNSd/Configuration.html in devdnsd-3.1.2 vs doc/DevDNSd/Configuration.html in devdnsd-4.0.0
- old
+ new
@@ -4,11 +4,11 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
Class: DevDNSd::Configuration
- — Documentation by YARD 0.8.7.4
+ — Documentation by YARD 0.8.7.6
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
@@ -127,11 +127,11 @@
<ul class="summary">
<li class="public ">
<span class="summary_signature">
- <a href="#add_rule-instance_method" title="#add_rule (instance method)">- (Array) <strong>add_rule</strong>(*args, &block) </a>
+ <a href="#add_rule-instance_method" title="#add_rule (instance method)">- (Array) <strong>add_rule</strong>(match: /.+/, reply: "127.0.0.1", type: :A, options: {}, &block) </a>
</span>
@@ -278,35 +278,27 @@
71
72
73
74
75
-76
-77
-78
-79
-80</pre>
+76</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/devdnsd/configuration.rb', line 64</span>
<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>
<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>
<span class='comment'># Make sure some arguments are of correct type
-</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='kw'>case</span> <span class='id identifier rubyid_log_file'>log_file</span>
- <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>STDOUT</span><span class='tstring_end'>"</span></span> <span class='kw'>then</span> <span class='gvar'>$stdout</span>
- <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>STDERR</span><span class='tstring_end'>"</span></span> <span class='kw'>then</span> <span class='gvar'>$stderr</span>
- <span class='kw'>else</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_absolute_path'>absolute_path</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_log_file'>log_file</span><span class='rparen'>)</span><span class='rparen'>)</span>
- <span class='kw'>end</span>
+</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='id identifier rubyid_resolve_log_file'>resolve_log_file</span>
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_pid_file'>pid_file</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_absolute_path'>absolute_path</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_pid_file'>pid_file</span><span class='rparen'>)</span><span class='rparen'>)</span>
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_port'>port</span> <span class='op'>=</span> <span class='id identifier rubyid_port'>port</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span>
<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='id identifier rubyid_log_level'>log_level</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span>
<span class='comment'># Add a default rule
-</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'>"</span><span class='tstring_content'>127.0.0.1</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_rules'>rules</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
+</span> <span class='id identifier rubyid_add_rule'>add_rule</span><span class='lparen'>(</span><span class='label'>match:</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='label'>reply:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>127.0.0.1</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_rules'>rules</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
@@ -319,11 +311,11 @@
<div class="method_details first">
<h3 class="signature first" id="add_rule-instance_method">
- - (<tt>Array</tt>) <strong>add_rule</strong>(*args, &block)
+ - (<tt>Array</tt>) <strong>add_rule</strong>(match: /.+/, reply: "127.0.0.1", type: :A, options: {}, &block)
@@ -338,34 +330,79 @@
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
- <span class='name'>args</span>
+ <span class='name'>match</span>
- <span class='type'>(<tt>Array</tt>)</span>
+ <span class='type'>(<tt>String|Regexp</tt>)</span>
—
- <div class='inline'><p>The rule’s arguments.</p>
+ <div class='inline'><p>The pattern to match.</p>
</div>
</li>
<li>
+ <span class='name'>reply</span>
+
+
+ <span class='type'>(<tt>String|Symbol</tt>)</span>
+
+
+
+ —
+ <div class='inline'><p>The IP or hostname to reply back to the client. It can be omitted (and it will be ignored) if a block is provided.</p>
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>type</span>
+
+
+ <span class='type'>(<tt>Symbol</tt>)</span>
+
+
+
+ —
+ <div class='inline'><p>The type of request to match.</p>
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>options</span>
+
+
+ <span class='type'>(<tt>Hash</tt>)</span>
+
+
+
+ —
+ <div class='inline'><p>A list of options for the request.</p>
+</div>
+
+ </li>
+
+ <li>
+
<span class='name'>block</span>
<span class='type'>(<tt>Proc</tt>)</span>
—
- <div class='inline'><p>An optional block for the rule.</p>
+ <div class='inline'><p>An optional block to compute the reply instead of using the <code>reply</code> parameter.</p>
</div>
</li>
</ul>
@@ -386,32 +423,25 @@
</li>
</ul>
- <p class="tag_title">See Also:</p>
- <ul class="see">
-
- <li><span class='object_link'><a href="Rule.html#create-class_method" title="DevDNSd::Rule.create (method)">Rule.create</a></span></li>
-
- </ul>
-
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
-88
-89
-90</pre>
+86
+87
+88</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/devdnsd/configuration.rb', line 88</span>
+ <pre class="code"><span class="info file"># File 'lib/devdnsd/configuration.rb', line 86</span>
-<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'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_rules'>rules</span> <span class='op'><<</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'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
+<span class='kw'>def</span> <span class='id identifier rubyid_add_rule'>add_rule</span><span class='lparen'>(</span><span class='label'>match:</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='label'>reply:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>127.0.0.1</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>type:</span> <span class='symbol'>:A</span><span class='comma'>,</span> <span class='label'>options:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_rules'>rules</span> <span class='op'><<</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='label'>match:</span> <span class='id identifier rubyid_match'>match</span><span class='comma'>,</span> <span class='label'>reply:</span> <span class='id identifier rubyid_reply'>reply</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='label'>options:</span> <span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
@@ -419,12 +449,12 @@
</div>
</div>
<div id="footer">
- Generated on Sat Mar 29 11:53:14 2014 by
+ Generated on Wed Mar 30 19:23:43 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
- 0.8.7.4 (ruby-2.1.0).
+ 0.8.7.6 (ruby-2.3.0).
</div>
</body>
</html>
\ No newline at end of file