doc/index.html in ionian-0.6.3 vs doc/index.html in ionian-0.6.4
- old
+ new
@@ -1,93 +1,133 @@
-<!DOCTYPE html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title>
+ File: README
+
+ — Documentation by YARD 0.8.7.3
+
+</title>
-<html>
-<head>
-<meta charset="UTF-8">
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
-<title>RDoc Documentation</title>
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
-<link href="./fonts.css" rel="stylesheet">
-<link href="./rdoc.css" rel="stylesheet">
-
-<script type="text/javascript">
- var rdoc_rel_prefix = "./";
+<script type="text/javascript" charset="utf-8">
+ hasFrames = window.top.frames.main ? true : false;
+ relpath = '';
+ framesUrl = "frames.html#!" + escape(window.location.href);
</script>
-<script src="./js/jquery.js"></script>
-<script src="./js/navigation.js"></script>
-<script src="./js/search_index.js"></script>
-<script src="./js/search.js"></script>
-<script src="./js/searcher.js"></script>
-<script src="./js/darkfish.js"></script>
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
-<body id="top" role="document" class="file">
-<nav role="navigation">
- <div id="project-navigation">
- <div id="home-section" role="region" title="Quick navigation" class="nav-section">
- <h2>
- <a href="./index.html" rel="home">Home</a>
- </h2>
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
- <div id="table-of-contents-navigation">
- <a href="./table_of_contents.html#pages">Pages</a>
- <a href="./table_of_contents.html#classes">Classes</a>
- <a href="./table_of_contents.html#methods">Methods</a>
- </div>
-</div>
+ </head>
+ <body>
+ <div id="header">
+ <div id="menu">
+
+ <a href="_index.html">Index</a> »
+ <span class="title">File: README</span>
+
- <div id="search-section" role="search" class="project-section initially-hidden">
- <form action="#" method="get" accept-charset="utf-8">
- <div id="search-field-wrapper">
- <input id="search-field" role="combobox" aria-label="Search"
- aria-autocomplete="list" aria-controls="search-results"
- type="text" name="search" placeholder="Search" spellcheck="false"
- title="Type to search, Up and Down to navigate, Enter to load">
- </div>
-
- <ul id="search-results" aria-label="Search Results"
- aria-busy="false" aria-expanded="false"
- aria-atomic="false" class="initially-hidden"></ul>
- </form>
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>
- </div>
-
- <div id="project-metadata">
-
- <div id="classindex-section" class="nav-section">
- <h3>Class and Module Index</h3>
-
- <ul class="link-list">
+ <div id="search">
- <li><a href="./Ionian.html">Ionian</a>
+ <a class="full_list_link" id="class_list_link"
+ href="class_list.html">
+ Class List
+ </a>
- <li><a href="./Ionian/Extension.html">Ionian::Extension</a>
+ <a class="full_list_link" id="method_list_link"
+ href="method_list.html">
+ Method List
+ </a>
- <li><a href="./Ionian/Extension/IO.html">Ionian::Extension::IO</a>
+ <a class="full_list_link" id="file_list_link"
+ href="file_list.html">
+ File List
+ </a>
- <li><a href="./Ionian/Extension/Socket.html">Ionian::Extension::Socket</a>
-
- <li><a href="./Ionian/Server.html">Ionian::Server</a>
-
- <li><a href="./Ionian/Socket.html">Ionian::Socket</a>
-
- </ul>
</div>
+ <div class="clear"></div>
+ </div>
- </div>
-</nav>
+ <iframe id="search_frame"></iframe>
-<main role="main">
-<p>This is the API documentation for RDoc Documentation.
-</main>
+ <div id="content"><div id='filecontents'><h1>Ionian</h1>
+<p><a href="http://badge.fury.io/rb/ionian"><img src="https://badge.fury.io/rb/ionian.png" alt="Gem Version" /></a></p>
+<p>A Ruby library to simplify interaction with IO streams. This includes network sockets, file sockets, and serial streams like the console and RS232. Features regular expression matching and notification of received data.</p>
-<footer id="validator-badges" role="contentinfo">
- <p><a href="http://validator.w3.org/check/referer">Validate</a>
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
-</footer>
+<h2>Supported Ruby Versions</h2>
+<ul>
+<li>MRI >= 2.0.0</li>
+</ul>
+
+
+<h2>Installation</h2>
+
+<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='id identifier rubyid_install'>install</span> <span class='id identifier rubyid_ionian'>ionian</span>
+</code></pre>
+
+<h2>Code Examples</h2>
+
+<h3>Creating A Socket</h3>
+
+<pre class="code ruby"><code class="ruby"><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'>'</span><span class='tstring_content'>127.0.0.1</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>port:</span> <span class='int'>23</span>
+</code></pre>
+
+<h3>Sending And Receiving Data</h3>
+
+<pre class="code ruby"><code class="ruby"><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'>'</span><span class='tstring_content'>google.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>port:</span> <span class='int'>80</span>
+<span class='id identifier rubyid_socket'>socket</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>GET / HTTP/1.1\r\n\r\n</span><span class='tstring_end'>"</span></span>
+<span class='id identifier rubyid_socket'>socket</span><span class='period'>.</span><span class='id identifier rubyid_read_match'>read_match</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_match'>match</span><span class='op'>|</span> <span class='id identifier rubyid_p'>p</span> <span class='id identifier rubyid_match'>match</span><span class='semicolon'>;</span> <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span>
+</code></pre>
+
+<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'>'</span><span class='tstring_content'>chat.freenode.net</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
+ <span class='label'>port:</span> <span class='int'>6667</span><span class='comma'>,</span>
+ <span class='comment'># Break up the matches into named captures so it's easier
+</span> <span class='comment'># to sort through the server's responses.
+</span> <span class='label'>expression:</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>:(?<server>.*?)\s*:(?<msg>.*?)[\r\n]+</span><span class='regexp_end'>/</span></span>
+
+<span class='comment'># Log on to IRC and send a message.
+</span><span class='id identifier rubyid_socket'>socket</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>NICK ionian-demo\r\nUSER ionian-demo ionian-demo chat.freenode.net :ionian-demo</span><span class='tstring_end'>"</span></span>
+<span class='id identifier rubyid_socket'>socket</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>PROTOCL NAMESX\r\n</span><span class='tstring_end'>"</span></span>
+<span class='id identifier rubyid_socket'>socket</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>JOIN #ionian-demo\r\n</span><span class='tstring_end'>"</span></span>
+<span class='id identifier rubyid_socket'>socket</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>PRIVMSG #ionian-demo :this is a test\r\n</span><span class='tstring_end'>"</span></span>
+
+
+<span class='id identifier rubyid_loop'>loop</span> <span class='kw'>do</span>
+ <span class='id identifier rubyid_socket'>socket</span><span class='period'>.</span><span class='id identifier rubyid_read_match'>read_match</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_match'>match</span><span class='op'>|</span>
+ <span class='comment'># Print the body of the server's responses.
+</span> <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_match'>match</span><span class='period'>.</span><span class='id identifier rubyid_msg'>msg</span>
+
+ <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'>'</span><span class='tstring_content'>End of /NAMES list.</span><span class='tstring_end'>'</span></span>
+ <span class='kw'>end</span>
+<span class='kw'>end</span>
+</code></pre>
+</div></div>
+
+ <div id="footer">
+ Generated on Sat Mar 15 21:04:53 2014 by
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
+ 0.8.7.3 (ruby-2.1.1).
+</div>
+
+ </body>
+</html>
\ No newline at end of file