doc/index.html in ionian-0.6.5 vs doc/index.html in ionian-0.6.6

- old
+ new

@@ -96,12 +96,11 @@ <h3>Match Expressions And Named Captures</h3> <pre class="code ruby"><code class="ruby"><span class='comment'># A simple IRC client. </span> <span class='id identifier rubyid_socket'>socket</span> <span class='op'>=</span> <span class='const'>Ionian</span><span class='op'>::</span><span class='const'>Socket</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> \ - <span class='label'>host:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>chat.freenode.net</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> - <span class='label'>port:</span> <span class='int'>6667</span><span class='comma'>,</span> + <span class='label'>host:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>chat.freenode.net:6667</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='comment'># Break up the matches into named captures so it&#39;s easier </span> <span class='comment'># to sort through the server&#39;s responses. </span> <span class='label'>expression:</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>:(?&lt;server&gt;.*?)\s*:(?&lt;msg&gt;.*?)[\r\n]+</span><span class='regexp_end'>/</span></span> <span class='comment'># Log on to IRC and send a message. @@ -119,13 +118,27 @@ <span class='comment'># Exit when the server has caught up. </span> <span class='id identifier rubyid_exit'>exit</span> <span class='kw'>if</span> <span class='id identifier rubyid_match'>match</span><span class='period'>.</span><span class='id identifier rubyid_msg'>msg</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>End of /NAMES list.</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>end</span> <span class='kw'>end</span> </code></pre> + +<h3>Simple Server</h3> + +<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_host'>host</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>localhost:5000</span><span class='tstring_end'>&#39;</span></span> + +<span class='id identifier rubyid_server'>server</span> <span class='op'>=</span> <span class='const'>Ionian</span><span class='op'>::</span><span class='const'>Server</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='label'>interface:</span> <span class='id identifier rubyid_host'>host</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_client'>client</span><span class='op'>|</span> + <span class='comment'># Greet the connected client. +</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Welcome! You are connected to the server.\n</span><span class='tstring_end'>&quot;</span></span> +<span class='kw'>end</span> + +<span class='id identifier rubyid_socket'>socket</span> <span class='op'>=</span> <span class='const'>Ionian</span><span class='op'>::</span><span class='const'>Socket</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='label'>host:</span> <span class='id identifier rubyid_host'>host</span> +<span class='comment'># Retrieve the greeting message. +</span><span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_socket'>socket</span><span class='period'>.</span><span class='id identifier rubyid_read_all'>read_all</span> +</code></pre> </div></div> <div id="footer"> - Generated on Fri Apr 11 21:18:17 2014 by + Generated on Sat Apr 12 13:24:31 2014 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.8.7.4 (ruby-2.1.1). </div> </body> \ No newline at end of file