diff options
author | Gibheer <gibheer@gmail.com> | 2012-11-27 06:41:09 +0100 |
---|---|---|
committer | Gibheer <gibheer@gmail.com> | 2012-11-27 06:41:09 +0100 |
commit | 7578cb9adb72b8761731a819b0c92327ae99cd62 (patch) | |
tree | 4bf1bdb1b0ff3f5a61502867bc11c638fd7aefc5 /doc/Zero | |
parent | 46739a8a2494f7b3e8ae83ce3caeee078378a473 (diff) |
Revert "added the first set of documentation"
This reverts commit 37a4a28deec224f7cd9a5a124e22258e868913e4.
Diffstat (limited to 'doc/Zero')
-rw-r--r-- | doc/Zero/Controller.html | 616 | ||||
-rw-r--r-- | doc/Zero/FileNotFoundError.html | 123 | ||||
-rw-r--r-- | doc/Zero/Renderer.html | 654 | ||||
-rw-r--r-- | doc/Zero/Request.html | 1476 | ||||
-rw-r--r-- | doc/Zero/Request/Accept.html | 612 | ||||
-rw-r--r-- | doc/Zero/Request/AcceptType.html | 403 | ||||
-rw-r--r-- | doc/Zero/Request/Client.html | 579 | ||||
-rw-r--r-- | doc/Zero/Request/Parameter.html | 489 | ||||
-rw-r--r-- | doc/Zero/Request/Server.html | 687 | ||||
-rw-r--r-- | doc/Zero/Response.html | 723 | ||||
-rw-r--r-- | doc/Zero/Router.html | 333 |
11 files changed, 0 insertions, 6695 deletions
diff --git a/doc/Zero/Controller.html b/doc/Zero/Controller.html deleted file mode 100644 index a4e6a0c..0000000 --- a/doc/Zero/Controller.html +++ /dev/null @@ -1,616 +0,0 @@ -<!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> - Class: Zero::Controller - - — Documentation by YARD 0.8.3 - -</title> - - <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" /> - - <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" /> - -<script type="text/javascript" charset="utf-8"> - hasFrames = window.top.frames.main ? true : false; - relpath = '../'; - framesUrl = "../frames.html#!" + escape(window.location.href); -</script> - - - <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script> - - <script type="text/javascript" charset="utf-8" src="../js/app.js"></script> - - - </head> - <body> - <div id="header"> - <div id="menu"> - - <a href="../_index.html">Index (C)</a> » - <span class='title'><span class='object_link'><a href="../Zero.html" title="Zero (module)">Zero</a></span></span> - » - <span class="title">Controller</span> - - - <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> -</div> - - <div id="search"> - - <a class="full_list_link" id="class_list_link" - href="../class_list.html"> - Class List - </a> - - <a class="full_list_link" id="method_list_link" - href="../method_list.html"> - Method List - </a> - - <a class="full_list_link" id="file_list_link" - href="../file_list.html"> - File List - </a> - -</div> - <div class="clear"></div> - </div> - - <iframe id="search_frame"></iframe> - - <div id="content"><h1>Class: Zero::Controller - - - -</h1> - -<dl class="box"> - - <dt class="r1">Inherits:</dt> - <dd class="r1"> - <span class="inheritName">Object</span> - - <ul class="fullTree"> - <li>Object</li> - - <li class="next">Zero::Controller</li> - - </ul> - <a href="#" class="inheritanceTree">show all</a> - - </dd> - - - - - - - - - - <dt class="r2 last">Defined in:</dt> - <dd class="r2 last">lib/zero/controller.rb</dd> - -</dl> -<div class="clear"></div> - -<h2>Overview</h2><div class="docstring"> - <div class="discussion"> - -<p>abstract class to make creation of controllers easier</p> - -<p>This abstract class creates an interface to make it easier to write rack -compatible controllers. It catches #call and creates a new instance with -the environment and calls #render on it.</p> - - - </div> -</div> -<div class="tags"> - - -</div> - - - - - - - - <h2> - Class Method Summary - <small>(<a href="#" class="summary_toggle">collapse</a>)</small> - </h2> - - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#call-class_method" title="call (class method)">+ (Object) <strong>call</strong>(env) </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>initialize a new instance of the controller and call response on it.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#renderer-class_method" title="renderer (class method)">+ (Object) <strong>renderer</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>get the renderer set in the controller.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#renderer%3D-class_method" title="renderer= (class method)">+ (Object) <strong>renderer=</strong>(renderer) </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>set the renderer to use in the controller.</p> -</div></span> - -</li> - - - </ul> - - <h2> - Instance Method Summary - <small>(<a href="#" class="summary_toggle">collapse</a>)</small> - </h2> - - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#initialize-instance_method" title="#initialize (instance method)">- (Controller) <strong>initialize</strong>(request) </a> - - - - </span> - - - <span class="note title constructor">constructor</span> - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>initialize the controller.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#renderer-instance_method" title="#renderer (instance method)">- (Object) <strong>renderer</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>a small helper to get the actual renderer.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#response-instance_method" title="#response (instance method)">- (Object) <strong>response</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>build the response and return it.</p> -</div></span> - -</li> - - - </ul> - - -<div id="constructor_details" class="method_details_list"> - <h2>Constructor Details</h2> - - <div class="method_details first"> - <h3 class="signature first" id="initialize-instance_method"> - - - (<tt><span class='object_link'><a href="" title="Zero::Controller (class)">Controller</a></span></tt>) <strong>initialize</strong>(request) - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>initialize the controller</p> - - - </div> -</div> -<div class="tags"> - <p class="tag_title">Parameters:</p> -<ul class="param"> - - <li> - - <span class='name'>request</span> - - - <span class='type'>(<tt><span class='object_link'><a href="Request.html" title="Zero::Request (class)">Request</a></span></tt>)</span> - - - - — - <div class='inline'> -<p>a request object</p> -</div> - - </li> - -</ul> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -30 -31 -32 -33</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/controller.rb', line 30</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_request identifier id'>request</span><span class='rparen token'>)</span> - <span class='rubyid_@request ivar id'>@request</span> <span class='assign token'>=</span> <span class='rubyid_request identifier id'>request</span> - <span class='rubyid_@response ivar id'>@response</span> <span class='assign token'>=</span> <span class='rubyid_Zero constant id'>Zero</span><span class='colon2 op'>::</span><span class='rubyid_Response constant id'>Response</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - -</div> - - - <div id="class_method_details" class="method_details_list"> - <h2>Class Method Details</h2> - - - <div class="method_details first"> - <h3 class="signature first" id="call-class_method"> - - + (<tt>Object</tt>) <strong>call</strong>(env) - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>initialize a new instance of the controller and call response on it</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -9 -10 -11</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/controller.rb', line 9</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_call identifier id'>call</span><span class='lparen token'>(</span><span class='rubyid_env identifier id'>env</span><span class='rparen token'>)</span> - <span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_Zero constant id'>Zero</span><span class='colon2 op'>::</span><span class='rubyid_Request constant id'>Request</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_env identifier id'>env</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_response identifier id'>response</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="renderer-class_method"> - - + (<tt>Object</tt>) <strong>renderer</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>get the renderer set in the controller</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -19 -20 -21</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/controller.rb', line 19</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_renderer identifier id'>renderer</span> - <span class='rubyid_@@renderer ivar id'>@@renderer</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="renderer=-class_method"> - - + (<tt>Object</tt>) <strong>renderer=</strong>(renderer) - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>set the renderer to use in the controller</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -14 -15 -16</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/controller.rb', line 14</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_renderer identifier id'>renderer</span><span class='assign token'>=</span><span class='lparen token'>(</span><span class='rubyid_renderer identifier id'>renderer</span><span class='rparen token'>)</span> - <span class='rubyid_@@renderer ivar id'>@@renderer</span> <span class='assign token'>=</span> <span class='rubyid_renderer identifier id'>renderer</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - </div> - - <div id="instance_method_details" class="method_details_list"> - <h2>Instance Method Details</h2> - - - <div class="method_details first"> - <h3 class="signature first" id="renderer-instance_method"> - - - (<tt>Object</tt>) <strong>renderer</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>a small helper to get the actual renderer</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -24 -25 -26</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/controller.rb', line 24</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_renderer identifier id'>renderer</span> - <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_class identifier id'>class</span><span class='dot token'>.</span><span class='rubyid_renderer identifier id'>renderer</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="response-instance_method"> - - - (<tt>Object</tt>) <strong>response</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>build the response and return it</p> - -<p>This method calls #process if it was defined so make it easier to process -the request before rendering stuff.</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'></span> - - - - - <div class='inline'> -<p>Response a rack conform response</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -40 -41 -42 -43 -44</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/controller.rb', line 40</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_response identifier id'>response</span> - <span class='rubyid_process identifier id'>process</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_respond_to? fid id'>respond_to?</span><span class='lparen token'>(</span><span class='symbol val'>:process</span><span class='rparen token'>)</span> - <span class='rubyid_render identifier id'>render</span> - <span class='rubyid_@response ivar id'>@response</span><span class='dot token'>.</span><span class='rubyid_to_a identifier id'>to_a</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - </div> - -</div> - - <div id="footer"> - Generated on Mon Nov 26 21:40:01 2012 by - <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.8.3 (ruby-1.9.3). -</div> - - </body> -</html>
\ No newline at end of file diff --git a/doc/Zero/FileNotFoundError.html b/doc/Zero/FileNotFoundError.html deleted file mode 100644 index 4515a76..0000000 --- a/doc/Zero/FileNotFoundError.html +++ /dev/null @@ -1,123 +0,0 @@ -<!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> - Exception: Zero::FileNotFoundError - - — Documentation by YARD 0.8.3 - -</title> - - <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" /> - - <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" /> - -<script type="text/javascript" charset="utf-8"> - hasFrames = window.top.frames.main ? true : false; - relpath = '../'; - framesUrl = "../frames.html#!" + escape(window.location.href); -</script> - - - <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script> - - <script type="text/javascript" charset="utf-8" src="../js/app.js"></script> - - - </head> - <body> - <div id="header"> - <div id="menu"> - - <a href="../_index.html">Index (F)</a> » - <span class='title'><span class='object_link'><a href="../Zero.html" title="Zero (module)">Zero</a></span></span> - » - <span class="title">FileNotFoundError</span> - - - <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> -</div> - - <div id="search"> - - <a class="full_list_link" id="class_list_link" - href="../class_list.html"> - Class List - </a> - - <a class="full_list_link" id="method_list_link" - href="../method_list.html"> - Method List - </a> - - <a class="full_list_link" id="file_list_link" - href="../file_list.html"> - File List - </a> - -</div> - <div class="clear"></div> - </div> - - <iframe id="search_frame"></iframe> - - <div id="content"><h1>Exception: Zero::FileNotFoundError - - - -</h1> - -<dl class="box"> - - <dt class="r1">Inherits:</dt> - <dd class="r1"> - <span class="inheritName">IOError</span> - - <ul class="fullTree"> - <li>Object</li> - - <li class="next">IOError</li> - - <li class="next">Zero::FileNotFoundError</li> - - </ul> - <a href="#" class="inheritanceTree">show all</a> - - </dd> - - - - - - - - - - <dt class="r2 last">Defined in:</dt> - <dd class="r2 last">lib/zero/renderer.rb</dd> - -</dl> -<div class="clear"></div> - - - - - - - - - - - -</div> - - <div id="footer"> - Generated on Mon Nov 26 21:40:00 2012 by - <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.8.3 (ruby-1.9.3). -</div> - - </body> -</html>
\ No newline at end of file diff --git a/doc/Zero/Renderer.html b/doc/Zero/Renderer.html deleted file mode 100644 index 4ce1cee..0000000 --- a/doc/Zero/Renderer.html +++ /dev/null @@ -1,654 +0,0 @@ -<!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> - Class: Zero::Renderer - - — Documentation by YARD 0.8.3 - -</title> - - <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" /> - - <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" /> - -<script type="text/javascript" charset="utf-8"> - hasFrames = window.top.frames.main ? true : false; - relpath = '../'; - framesUrl = "../frames.html#!" + escape(window.location.href); -</script> - - - <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script> - - <script type="text/javascript" charset="utf-8" src="../js/app.js"></script> - - - </head> - <body> - <div id="header"> - <div id="menu"> - - <a href="../_index.html">Index (R)</a> » - <span class='title'><span class='object_link'><a href="../Zero.html" title="Zero (module)">Zero</a></span></span> - » - <span class="title">Renderer</span> - - - <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> -</div> - - <div id="search"> - - <a class="full_list_link" id="class_list_link" - href="../class_list.html"> - Class List - </a> - - <a class="full_list_link" id="method_list_link" - href="../method_list.html"> - Method List - </a> - - <a class="full_list_link" id="file_list_link" - href="../file_list.html"> - File List - </a> - -</div> - <div class="clear"></div> - </div> - - <iframe id="search_frame"></iframe> - - <div id="content"><h1>Class: Zero::Renderer - - - -</h1> - -<dl class="box"> - - <dt class="r1">Inherits:</dt> - <dd class="r1"> - <span class="inheritName">Object</span> - - <ul class="fullTree"> - <li>Object</li> - - <li class="next">Zero::Renderer</li> - - </ul> - <a href="#" class="inheritanceTree">show all</a> - - </dd> - - - - - - - - - - <dt class="r2 last">Defined in:</dt> - <dd class="r2 last">lib/zero/renderer.rb</dd> - -</dl> -<div class="clear"></div> - -<h2>Overview</h2><div class="docstring"> - <div class="discussion"> - -<p>This class helps with rendering of content.</p> - -<p>The purpose of this class is to render templates. All variables pushed into -the renderer should be already processed, so that the raw data can be used.</p> - -<p>The workflow of this class is like the following.</p> -<ul><li> -<p>setup the type mapping</p> -</li><li> -<p>create a new instance of the class to prepare rendering</p> -</li><li> -<p>call #render to process the template</p> -</li></ul> - -<p>The call to #render will return the String representation of the template -with all data given.</p> - - - </div> -</div> -<div class="tags"> - - -</div> - - - - - - - - <h2> - Class Method Summary - <small>(<a href="#" class="summary_toggle">collapse</a>)</small> - </h2> - - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#template_path%3D-class_method" title="template_path= (class method)">+ (Object) <strong>template_path=</strong>(path) </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>set a base path for template search.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#type_map-class_method" title="type_map (class method)">+ (Hash) <strong>type_map</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>returns the type map.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#type_map%3D-class_method" title="type_map= (class method)">+ (Object) <strong>type_map=</strong>(map) </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>save a mapping hash for the type.</p> -</div></span> - -</li> - - - </ul> - - <h2> - Instance Method Summary - <small>(<a href="#" class="summary_toggle">collapse</a>)</small> - </h2> - - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#initialize-instance_method" title="#initialize (instance method)">- (Renderer) <strong>initialize</strong>(path, context, accept_types) </a> - - - - </span> - - - <span class="note title constructor">constructor</span> - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>take the path and render the template within the context.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#render-instance_method" title="#render (instance method)">- (String) <strong>render</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>render the template within the context.</p> -</div></span> - -</li> - - - </ul> - - -<div id="constructor_details" class="method_details_list"> - <h2>Constructor Details</h2> - - <div class="method_details first"> - <h3 class="signature first" id="initialize-instance_method"> - - - (<tt><span class='object_link'><a href="" title="Zero::Renderer (class)">Renderer</a></span></tt>) <strong>initialize</strong>(path, context, accept_types) - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>take the path and render the template within the context</p> - - - </div> -</div> -<div class="tags"> - <p class="tag_title">Parameters:</p> -<ul class="param"> - - <li> - - <span class='name'>path</span> - - - <span class='type'>(<tt>String</tt>)</span> - - - - — - <div class='inline'> -<p>the relative path to the template</p> -</div> - - </li> - - <li> - - <span class='name'>context</span> - - - <span class='type'>(<tt>Object</tt>)</span> - - - - — - <div class='inline'> -<p>the object to process on</p> -</div> - - </li> - - <li> - - <span class='name'>accept_types</span> - - - <span class='type'></span> - - - - </li> - -</ul> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -49 -50 -51 -52 -53</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/renderer.rb', line 49</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_path identifier id'>path</span><span class='comma token'>,</span> <span class='rubyid_context identifier id'>context</span><span class='comma token'>,</span> <span class='rubyid_accept_types identifier id'>accept_types</span><span class='rparen token'>)</span> - <span class='rubyid_accept_types identifier id'>accept_types</span> <span class='opasgn op'>||=</span> <span class='rubyid_Request constant id'>Request</span><span class='colon2 op'>::</span><span class='rubyid_Accept constant id'>Accept</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='string val'>'text/html'</span><span class='rparen token'>)</span> - <span class='rubyid_@path ivar id'>@path</span> <span class='assign token'>=</span> <span class='rubyid_find_template identifier id'>find_template</span><span class='lparen token'>(</span><span class='rubyid_path identifier id'>path</span><span class='comma token'>,</span> <span class='rubyid_accept_types identifier id'>accept_types</span><span class='rparen token'>)</span> - <span class='rubyid_@context ivar id'>@context</span> <span class='assign token'>=</span> <span class='rubyid_context identifier id'>context</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - -</div> - - - <div id="class_method_details" class="method_details_list"> - <h2>Class Method Details</h2> - - - <div class="method_details first"> - <h3 class="signature first" id="template_path=-class_method"> - - + (<tt>Object</tt>) <strong>template_path=</strong>(path) - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>set a base path for template search</p> - - - </div> -</div> -<div class="tags"> - <p class="tag_title">Parameters:</p> -<ul class="param"> - - <li> - - <span class='name'>path</span> - - - <span class='type'>(<tt>String</tt>)</span> - - - - — - <div class='inline'> -<p>the path to the template base dir</p> -</div> - - </li> - -</ul> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -20 -21 -22</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/renderer.rb', line 20</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_template_path= identifier id'>template_path=</span><span class='lparen token'>(</span><span class='rubyid_path identifier id'>path</span><span class='rparen token'>)</span> - <span class='rubyid_@@path ivar id'>@@path</span> <span class='assign token'>=</span> <span class='rubyid_path identifier id'>path</span> <span class='plus op'>+</span> <span class='string val'>'/'</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="type_map-class_method"> - - + (<tt>Hash</tt>) <strong>type_map</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>returns the type map</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>Hash</tt>)</span> - - - - — - <div class='inline'> -<p>the mapping for types</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -40 -41 -42</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/renderer.rb', line 40</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_type_map identifier id'>type_map</span> - <span class='rubyid_@@map ivar id'>@@map</span> <span class='opasgn op'>||=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="type_map=-class_method"> - - + (<tt>Object</tt>) <strong>type_map=</strong>(map) - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>save a mapping hash for the type</p> - -<p>With that it is possible to map long and complex contant types to simpler -representations. These get then used in the finding process for the best -fitting template.</p> - - - </div> -</div> -<div class="tags"> - - <div class="examples"> - <p class="tag_title">Examples:</p> - - - <pre class="example code"><span class='rubyid_Zero constant id'>Zero</span><span class='colon2 op'>::</span><span class='rubyid_Renderer constant id'>Renderer</span><span class='dot token'>.</span><span class='rubyid_map identifier id'>map</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='string val'>'text/html'</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>'html'</span><span class='rbrace token'>}</span> -</pre> - - </div> -<p class="tag_title">Parameters:</p> -<ul class="param"> - - <li> - - <span class='name'>map</span> - - - <span class='type'>(<tt>Hash</tt>)</span> - - - - — - <div class='inline'> -<p>maps the content type to a simple representation</p> -</div> - - </li> - -</ul> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -34 -35 -36</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/renderer.rb', line 34</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_type_map= identifier id'>type_map=</span><span class='lparen token'>(</span><span class='rubyid_map identifier id'>map</span><span class='rparen token'>)</span> - <span class='rubyid_@@map ivar id'>@@map</span> <span class='assign token'>=</span> <span class='rubyid_map identifier id'>map</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - </div> - - <div id="instance_method_details" class="method_details_list"> - <h2>Instance Method Details</h2> - - - <div class="method_details first"> - <h3 class="signature first" id="render-instance_method"> - - - (<tt>String</tt>) <strong>render</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>render the template within the context</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>String</tt>)</span> - - - - — - <div class='inline'> -<p>the rendered template</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -57 -58 -59</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/renderer.rb', line 57</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_render identifier id'>render</span> - <span class='rubyid_Tilt constant id'>Tilt</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_@path ivar id'>@path</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_render identifier id'>render</span><span class='lparen token'>(</span><span class='rubyid_@context ivar id'>@context</span><span class='rparen token'>)</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - </div> - -</div> - - <div id="footer"> - Generated on Mon Nov 26 21:40:01 2012 by - <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.8.3 (ruby-1.9.3). -</div> - - </body> -</html>
\ No newline at end of file diff --git a/doc/Zero/Request.html b/doc/Zero/Request.html deleted file mode 100644 index 03e5591..0000000 --- a/doc/Zero/Request.html +++ /dev/null @@ -1,1476 +0,0 @@ -<!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> - Class: Zero::Request - - — Documentation by YARD 0.8.3 - -</title> - - <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" /> - - <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" /> - -<script type="text/javascript" charset="utf-8"> - hasFrames = window.top.frames.main ? true : false; - relpath = '../'; - framesUrl = "../frames.html#!" + escape(window.location.href); -</script> - - - <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script> - - <script type="text/javascript" charset="utf-8" src="../js/app.js"></script> - - - </head> - <body> - <div id="header"> - <div id="menu"> - - <a href="../_index.html">Index (R)</a> » - <span class='title'><span class='object_link'><a href="../Zero.html" title="Zero (module)">Zero</a></span></span> - » - <span class="title">Request</span> - - - <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> -</div> - - <div id="search"> - - <a class="full_list_link" id="class_list_link" - href="../class_list.html"> - Class List - </a> - - <a class="full_list_link" id="method_list_link" - href="../method_list.html"> - Method List - </a> - - <a class="full_list_link" id="file_list_link" - href="../file_list.html"> - File List - </a> - -</div> - <div class="clear"></div> - </div> - - <iframe id="search_frame"></iframe> - - <div id="content"><h1>Class: Zero::Request - - - -</h1> - -<dl class="box"> - - <dt class="r1">Inherits:</dt> - <dd class="r1"> - <span class="inheritName">Object</span> - - <ul class="fullTree"> - <li>Object</li> - - <li class="next">Zero::Request</li> - - </ul> - <a href="#" class="inheritanceTree">show all</a> - - </dd> - - - - - - - - - - <dt class="r2 last">Defined in:</dt> - <dd class="r2 last">lib/zero/request.rb<span class="defines">,<br /> - lib/zero/request/server.rb,<br /> lib/zero/request/client.rb,<br /> lib/zero/request/accept.rb,<br /> lib/zero/request/parameter.rb,<br /> lib/zero/request/accept_type.rb</span> -</dd> - -</dl> -<div class="clear"></div> - -<h2>Overview</h2><div class="docstring"> - <div class="discussion"> - -<p>This class wraps around a rack environment for easier access to all data.</p> - - - </div> -</div> -<div class="tags"> - - -</div><h2>Defined Under Namespace</h2> -<p class="children"> - - - - - <strong class="classes">Classes:</strong> <span class='object_link'><a href="Request/Accept.html" title="Zero::Request::Accept (class)">Accept</a></span>, <span class='object_link'><a href="Request/AcceptType.html" title="Zero::Request::AcceptType (class)">AcceptType</a></span>, <span class='object_link'><a href="Request/Client.html" title="Zero::Request::Client (class)">Client</a></span>, <span class='object_link'><a href="Request/Parameter.html" title="Zero::Request::Parameter (class)">Parameter</a></span>, <span class='object_link'><a href="Request/Server.html" title="Zero::Request::Server (class)">Server</a></span> - - -</p> - - <h2>Constant Summary</h2> - - - - - - <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2> - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#env-instance_method" title="#env (instance method)">- (Hash) <strong>env</strong> </a> - - - - </span> - - - - - <span class="note title readonly">readonly</span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>get the environment.</p> -</div></span> - -</li> - - - </ul> - - - - - - <h2> - Class Method Summary - <small>(<a href="#" class="summary_toggle">collapse</a>)</small> - </h2> - - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#create-class_method" title="create (class method)">+ (Object) <strong>create</strong>(environment) </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'></div></span> - -</li> - - - </ul> - - <h2> - Instance Method Summary - <small>(<a href="#" class="summary_toggle">collapse</a>)</small> - </h2> - - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#accept-instance_method" title="#accept (instance method)">- (Accept) <strong>accept</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>get the media types.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#client-instance_method" title="#client (instance method)">- (Client) <strong>client</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>return all information about the client.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#content_type-instance_method" title="#content_type (instance method)">- (String) <strong>content_type</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>return the content type of the request TODO change into its own object?.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#delete%3F-instance_method" title="#delete? (instance method)">- (Boolean) <strong>delete?</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>is the method 'DELETE'?.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#get%3F-instance_method" title="#get? (instance method)">- (Boolean) <strong>get?</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>is the method 'GET'?.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#head%3F-instance_method" title="#head? (instance method)">- (Boolean) <strong>head?</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>is the method 'HEAD'?.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#initialize-instance_method" title="#initialize (instance method)">- (Request) <strong>initialize</strong>(env) </a> - - - - </span> - - - <span class="note title constructor">constructor</span> - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>create a new request object.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#method-instance_method" title="#method (instance method)">- (Symbol) <strong>method</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>get the method of the request.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#params-instance_method" title="#params (instance method)">- (Parameter) <strong>params</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>get an object representing the parameters of the request.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#patch%3F-instance_method" title="#patch? (instance method)">- (Boolean) <strong>patch?</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>is the method 'PATCH'?.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#path-instance_method" title="#path (instance method)">- (String) <strong>path</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>get the requested path.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#post%3F-instance_method" title="#post? (instance method)">- (Boolean) <strong>post?</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>is the method 'POST'?.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#put%3F-instance_method" title="#put? (instance method)">- (Boolean) <strong>put?</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>is the method 'PUT'?.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#server-instance_method" title="#server (instance method)">- (Server) <strong>server</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>get the information on the server.</p> -</div></span> - -</li> - - - </ul> - - -<div id="constructor_details" class="method_details_list"> - <h2>Constructor Details</h2> - - <div class="method_details first"> - <h3 class="signature first" id="initialize-instance_method"> - - - (<tt><span class='object_link'><a href="" title="Zero::Request (class)">Request</a></span></tt>) <strong>initialize</strong>(env) - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>create a new request object</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -15 -16 -17 -18</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request.rb', line 15</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_env identifier id'>env</span><span class='rparen token'>)</span> - <span class='rubyid_@env ivar id'>@env</span> <span class='assign token'>=</span> <span class='rubyid_env identifier id'>env</span> - <span class='rubyid_@env ivar id'>@env</span><span class='lbrack token'>[</span><span class='string val'>'zero.request'</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - -</div> - - <div id="instance_attr_details" class="attr_details"> - <h2>Instance Attribute Details</h2> - - - <span id=""></span> - <div class="method_details first"> - <h3 class="signature first" id="env-instance_method"> - - - (<tt>Hash</tt>) <strong>env</strong> <span class="extras">(readonly)</span> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>get the environment</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>Hash</tt>)</span> - - - - — - <div class='inline'> -<p>the environment hash</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -22 -23 -24</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request.rb', line 22</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_env identifier id'>env</span> - <span class='rubyid_@env ivar id'>@env</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - </div> - - - <div id="class_method_details" class="method_details_list"> - <h2>Class Method Details</h2> - - - <div class="method_details first"> - <h3 class="signature first" id="create-class_method"> - - + (<tt>Object</tt>) <strong>create</strong>(environment) - - - - - -</h3><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -9 -10 -11 -12</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request.rb', line 9</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_create identifier id'>create</span><span class='lparen token'>(</span><span class='rubyid_environment identifier id'>environment</span><span class='rparen token'>)</span> - <span class='rubyid_return return kw'>return</span> <span class='rubyid_environment identifier id'>environment</span><span class='lbrack token'>[</span><span class='string val'>'zero.request'</span><span class='rbrack token'>]</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_environment identifier id'>environment</span><span class='dot token'>.</span><span class='rubyid_has_key? fid id'>has_key?</span><span class='lparen token'>(</span><span class='string val'>'zero.request'</span><span class='rparen token'>)</span> - <span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_environment identifier id'>environment</span><span class='rparen token'>)</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - </div> - - <div id="instance_method_details" class="method_details_list"> - <h2>Instance Method Details</h2> - - - <div class="method_details first"> - <h3 class="signature first" id="accept-instance_method"> - - - (<tt><span class='object_link'><a href="Request/Accept.html" title="Zero::Request::Accept (class)">Accept</a></span></tt>) <strong>accept</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>get the media types</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt><span class='object_link'><a href="Request/Accept.html" title="Zero::Request::Accept (class)">Accept</a></span></tt>)</span> - - - - — - <div class='inline'> -<p>on Accept object managing all types and their order</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -57 -58 -59</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request.rb', line 57</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_accept identifier id'>accept</span> - <span class='rubyid_@accept ivar id'>@accept</span> <span class='opasgn op'>||=</span> <span class='rubyid_Request constant id'>Request</span><span class='colon2 op'>::</span><span class='rubyid_Accept constant id'>Accept</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_@env ivar id'>@env</span><span class='rparen token'>)</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="client-instance_method"> - - - (<tt><span class='object_link'><a href="Request/Client.html" title="Zero::Request::Client (class)">Client</a></span></tt>) <strong>client</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>return all information about the client</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt><span class='object_link'><a href="Request/Client.html" title="Zero::Request::Client (class)">Client</a></span></tt>)</span> - - - - — - <div class='inline'> -<p>an information object about the client</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -32 -33 -34</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request.rb', line 32</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_client identifier id'>client</span> - <span class='rubyid_@client ivar id'>@client</span> <span class='opasgn op'>||=</span> <span class='rubyid_Request constant id'>Request</span><span class='colon2 op'>::</span><span class='rubyid_Client constant id'>Client</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_@env ivar id'>@env</span><span class='rparen token'>)</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="content_type-instance_method"> - - - (<tt>String</tt>) <strong>content_type</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>return the content type of the request TODO change into its own object?</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>String</tt>)</span> - - - - — - <div class='inline'> -<p>returns the content type of the request</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -51 -52 -53</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request.rb', line 51</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_content_type identifier id'>content_type</span> - <span class='rubyid_@env ivar id'>@env</span><span class='lbrack token'>[</span><span class='rubyid_CONST_CONTENT_TYPE constant id'>CONST_CONTENT_TYPE</span><span class='rbrack token'>]</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_@env ivar id'>@env</span><span class='dot token'>.</span><span class='rubyid_has_key? fid id'>has_key?</span><span class='lparen token'>(</span><span class='rubyid_CONST_CONTENT_TYPE constant id'>CONST_CONTENT_TYPE</span><span class='rparen token'>)</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="delete?-instance_method"> - - - (<tt>Boolean</tt>) <strong>delete?</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>is the method 'DELETE'?</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>Boolean</tt>)</span> - - - - — - <div class='inline'> -<p>true if this is a delete request</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -77</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request.rb', line 77</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_delete? fid id'>delete?</span><span class='semicolon token'>;</span> <span class='rubyid_method identifier id'>method</span> <span class='eq op'>==</span> <span class='symbol val'>:delete</span> <span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="get?-instance_method"> - - - (<tt>Boolean</tt>) <strong>get?</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>is the method 'GET'?</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>Boolean</tt>)</span> - - - - — - <div class='inline'> -<p>true if this is a get request</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -68</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request.rb', line 68</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_get? fid id'>get?</span><span class='semicolon token'>;</span> <span class='rubyid_method identifier id'>method</span> <span class='eq op'>==</span> <span class='symbol val'>:get</span> <span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="head?-instance_method"> - - - (<tt>Boolean</tt>) <strong>head?</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>is the method 'HEAD'?</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>Boolean</tt>)</span> - - - - — - <div class='inline'> -<p>true if this is a head request</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -80</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request.rb', line 80</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_head? fid id'>head?</span><span class='semicolon token'>;</span> <span class='rubyid_method identifier id'>method</span> <span class='eq op'>==</span> <span class='symbol val'>:head</span> <span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="method-instance_method"> - - - (<tt>Symbol</tt>) <strong>method</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>get the method of the request</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>Symbol</tt>)</span> - - - - — - <div class='inline'> -<p>the symbol representation of the method</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -63 -64 -65</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request.rb', line 63</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_method identifier id'>method</span> - <span class='rubyid_@method ivar id'>@method</span> <span class='opasgn op'>||=</span> <span class='rubyid_@env ivar id'>@env</span><span class='lbrack token'>[</span><span class='rubyid_CONST_REQUEST_METHOD constant id'>CONST_REQUEST_METHOD</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_downcase identifier id'>downcase</span><span class='dot token'>.</span><span class='rubyid_to_sym identifier id'>to_sym</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="params-instance_method"> - - - (<tt><span class='object_link'><a href="Request/Parameter.html" title="Zero::Request::Parameter (class)">Parameter</a></span></tt>) <strong>params</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>get an object representing the parameters of the request</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt><span class='object_link'><a href="Request/Parameter.html" title="Zero::Request::Parameter (class)">Parameter</a></span></tt>)</span> - - - - — - <div class='inline'> -<p>object having all parameters</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -44 -45 -46</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request.rb', line 44</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_params identifier id'>params</span> - <span class='rubyid_@params ivar id'>@params</span> <span class='opasgn op'>||=</span> <span class='rubyid_Request constant id'>Request</span><span class='colon2 op'>::</span><span class='rubyid_Parameter constant id'>Parameter</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_@env ivar id'>@env</span><span class='rparen token'>)</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="patch?-instance_method"> - - - (<tt>Boolean</tt>) <strong>patch?</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>is the method 'PATCH'?</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>Boolean</tt>)</span> - - - - — - <div class='inline'> -<p>true if this is a patch request</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -83</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request.rb', line 83</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_patch? fid id'>patch?</span><span class='semicolon token'>;</span> <span class='rubyid_method identifier id'>method</span> <span class='eq op'>==</span> <span class='symbol val'>:patch</span> <span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="path-instance_method"> - - - (<tt>String</tt>) <strong>path</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>get the requested path</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>String</tt>)</span> - - - - — - <div class='inline'> -<p>returns the requested path</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -26 -27 -28</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request.rb', line 26</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_path identifier id'>path</span> - <span class='rubyid_@path ivar id'>@path</span> <span class='opasgn op'>||=</span> <span class='rubyid_@env ivar id'>@env</span><span class='lbrack token'>[</span><span class='rubyid_CONST_PATH_INFO constant id'>CONST_PATH_INFO</span><span class='rbrack token'>]</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="post?-instance_method"> - - - (<tt>Boolean</tt>) <strong>post?</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>is the method 'POST'?</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>Boolean</tt>)</span> - - - - — - <div class='inline'> -<p>true if this is a post request</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -71</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request.rb', line 71</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_post? fid id'>post?</span><span class='semicolon token'>;</span> <span class='rubyid_method identifier id'>method</span> <span class='eq op'>==</span> <span class='symbol val'>:post</span> <span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="put?-instance_method"> - - - (<tt>Boolean</tt>) <strong>put?</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>is the method 'PUT'?</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>Boolean</tt>)</span> - - - - — - <div class='inline'> -<p>true if this is a put request</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -74</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request.rb', line 74</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_put? fid id'>put?</span><span class='semicolon token'>;</span> <span class='rubyid_method identifier id'>method</span> <span class='eq op'>==</span> <span class='symbol val'>:put</span> <span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="server-instance_method"> - - - (<tt><span class='object_link'><a href="Request/Server.html" title="Zero::Request::Server (class)">Server</a></span></tt>) <strong>server</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>get the information on the server</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt><span class='object_link'><a href="Request/Server.html" title="Zero::Request::Server (class)">Server</a></span></tt>)</span> - - - - — - <div class='inline'> -<p>information on the running server</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -38 -39 -40</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request.rb', line 38</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_server identifier id'>server</span> - <span class='rubyid_@server ivar id'>@server</span> <span class='opasgn op'>||=</span> <span class='rubyid_Request constant id'>Request</span><span class='colon2 op'>::</span><span class='rubyid_Server constant id'>Server</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_@env ivar id'>@env</span><span class='rparen token'>)</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - </div> - -</div> - - <div id="footer"> - Generated on Mon Nov 26 21:40:00 2012 by - <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.8.3 (ruby-1.9.3). -</div> - - </body> -</html>
\ No newline at end of file diff --git a/doc/Zero/Request/Accept.html b/doc/Zero/Request/Accept.html deleted file mode 100644 index 8a45ae0..0000000 --- a/doc/Zero/Request/Accept.html +++ /dev/null @@ -1,612 +0,0 @@ -<!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> - Class: Zero::Request::Accept - - — Documentation by YARD 0.8.3 - -</title> - - <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" /> - - <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" /> - -<script type="text/javascript" charset="utf-8"> - hasFrames = window.top.frames.main ? true : false; - relpath = '../../'; - framesUrl = "../../frames.html#!" + escape(window.location.href); -</script> - - - <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script> - - <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script> - - - </head> - <body> - <div id="header"> - <div id="menu"> - - <a href="../../_index.html">Index (A)</a> » - <span class='title'><span class='object_link'><a href="../../Zero.html" title="Zero (module)">Zero</a></span></span> » <span class='title'><span class='object_link'><a href="../Request.html" title="Zero::Request (class)">Request</a></span></span> - » - <span class="title">Accept</span> - - - <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> -</div> - - <div id="search"> - - <a class="full_list_link" id="class_list_link" - href="../../class_list.html"> - Class List - </a> - - <a class="full_list_link" id="method_list_link" - href="../../method_list.html"> - Method List - </a> - - <a class="full_list_link" id="file_list_link" - href="../../file_list.html"> - File List - </a> - -</div> - <div class="clear"></div> - </div> - - <iframe id="search_frame"></iframe> - - <div id="content"><h1>Class: Zero::Request::Accept - - - -</h1> - -<dl class="box"> - - <dt class="r1">Inherits:</dt> - <dd class="r1"> - <span class="inheritName">Object</span> - - <ul class="fullTree"> - <li>Object</li> - - <li class="next">Zero::Request::Accept</li> - - </ul> - <a href="#" class="inheritanceTree">show all</a> - - </dd> - - - - - - - - - - <dt class="r2 last">Defined in:</dt> - <dd class="r2 last">lib/zero/request/accept.rb</dd> - -</dl> -<div class="clear"></div> - -<h2>Overview</h2><div class="docstring"> - <div class="discussion"> - -<p>encapsulates the accept header to easier work with this is partly copied -from sinatra</p> - - - </div> -</div> -<div class="tags"> - - -</div> - <h2>Constant Summary</h2> - - <dl class="constants"> - - <dt id="MEDIA_TYPE_SEPERATOR-constant" class="">MEDIA_TYPE_SEPERATOR = - - </dt> - <dd><pre class="code"><span class='string val'>','</span> -</pre></dd> - - <dt id="MEDIA_PARAM_SEPERATOR-constant" class="">MEDIA_PARAM_SEPERATOR = - - </dt> - <dd><pre class="code"><span class='string val'>';'</span> -</pre></dd> - - <dt id="MEDIA_QUALITY_REGEX-constant" class="">MEDIA_QUALITY_REGEX = - - </dt> - <dd><pre class="code"><span class='regexp val'>/q=[01]\./</span> -</pre></dd> - - <dt id="KEY_HTTP_ACCEPT-constant" class="">KEY_HTTP_ACCEPT = - - </dt> - <dd><pre class="code"><span class='string val'>'HTTP_ACCEPT'</span> -</pre></dd> - - <dt id="KEY_HTTP_ACCEPT_LANGUAGE-constant" class="">KEY_HTTP_ACCEPT_LANGUAGE = - - </dt> - <dd><pre class="code"><span class='string val'>'HTTP_ACCEPT_LANGUAGE'</span> -</pre></dd> - - <dt id="KEY_HTTP_ACCEPT_ENCODING-constant" class="">KEY_HTTP_ACCEPT_ENCODING = - - </dt> - <dd><pre class="code"><span class='string val'>'HTTP_ACCEPT_ENCODING'</span> -</pre></dd> - - </dl> - - - - - - <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2> - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#encoding-instance_method" title="#encoding (instance method)">- (Object) <strong>encoding</strong> </a> - - - - </span> - - - - - <span class="note title readonly">readonly</span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>Returns the value of attribute encoding.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#language-instance_method" title="#language (instance method)">- (Object) <strong>language</strong> </a> - - - - </span> - - - - - <span class="note title readonly">readonly</span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>Returns the value of attribute language.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#types-instance_method" title="#types (instance method)">- (Object) <strong>types</strong> </a> - - - - </span> - - - - - <span class="note title readonly">readonly</span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>Returns the value of attribute types.</p> -</div></span> - -</li> - - - </ul> - - - - - - <h2> - Class Method Summary - <small>(<a href="#" class="summary_toggle">collapse</a>)</small> - </h2> - - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#map-class_method" title="map (class method)">+ (Object) <strong>map</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'></div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#map%3D-class_method" title="map= (class method)">+ (Object) <strong>map=</strong>(map) </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'></div></span> - -</li> - - - </ul> - - <h2> - Instance Method Summary - <small>(<a href="#" class="summary_toggle">collapse</a>)</small> - </h2> - - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#initialize-instance_method" title="#initialize (instance method)">- (Accept) <strong>initialize</strong>(environment) </a> - - - - </span> - - - <span class="note title constructor">constructor</span> - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>create a new accept object.</p> -</div></span> - -</li> - - - </ul> - - -<div id="constructor_details" class="method_details_list"> - <h2>Constructor Details</h2> - - <div class="method_details first"> - <h3 class="signature first" id="initialize-instance_method"> - - - (<tt><span class='object_link'><a href="" title="Zero::Request::Accept (class)">Accept</a></span></tt>) <strong>initialize</strong>(environment) - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>create a new accept object</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -25 -26 -27 -28 -29</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/accept.rb', line 25</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_environment identifier id'>environment</span><span class='rparen token'>)</span> - <span class='rubyid_@types ivar id'>@types</span> <span class='assign token'>=</span> <span class='rubyid_AcceptType constant id'>AcceptType</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_environment identifier id'>environment</span><span class='lbrack token'>[</span><span class='rubyid_KEY_HTTP_ACCEPT constant id'>KEY_HTTP_ACCEPT</span><span class='rbrack token'>]</span><span class='rparen token'>)</span> - <span class='rubyid_@language ivar id'>@language</span> <span class='assign token'>=</span> <span class='rubyid_AcceptType constant id'>AcceptType</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_environment identifier id'>environment</span><span class='lbrack token'>[</span><span class='rubyid_KEY_HTTP_ACCEPT_LANGUAGE constant id'>KEY_HTTP_ACCEPT_LANGUAGE</span><span class='rbrack token'>]</span><span class='rparen token'>)</span> - <span class='rubyid_@encoding ivar id'>@encoding</span> <span class='assign token'>=</span> <span class='rubyid_AcceptType constant id'>AcceptType</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_environment identifier id'>environment</span><span class='lbrack token'>[</span><span class='rubyid_KEY_HTTP_ACCEPT_ENCODING constant id'>KEY_HTTP_ACCEPT_ENCODING</span><span class='rbrack token'>]</span><span class='rparen token'>)</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - -</div> - - <div id="instance_attr_details" class="attr_details"> - <h2>Instance Attribute Details</h2> - - - <span id=""></span> - <div class="method_details first"> - <h3 class="signature first" id="encoding-instance_method"> - - - (<tt>Object</tt>) <strong>encoding</strong> <span class="extras">(readonly)</span> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>Returns the value of attribute encoding</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -33 -34 -35</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/accept.rb', line 33</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_encoding identifier id'>encoding</span> - <span class='rubyid_@encoding ivar id'>@encoding</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - - <span id=""></span> - <div class="method_details "> - <h3 class="signature " id="language-instance_method"> - - - (<tt>Object</tt>) <strong>language</strong> <span class="extras">(readonly)</span> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>Returns the value of attribute language</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -32 -33 -34</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/accept.rb', line 32</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_language identifier id'>language</span> - <span class='rubyid_@language ivar id'>@language</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - - <span id=""></span> - <div class="method_details "> - <h3 class="signature " id="types-instance_method"> - - - (<tt>Object</tt>) <strong>types</strong> <span class="extras">(readonly)</span> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>Returns the value of attribute types</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -31 -32 -33</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/accept.rb', line 31</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_types identifier id'>types</span> - <span class='rubyid_@types ivar id'>@types</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - </div> - - - <div id="class_method_details" class="method_details_list"> - <h2>Class Method Details</h2> - - - <div class="method_details first"> - <h3 class="signature first" id="map-class_method"> - - + (<tt>Object</tt>) <strong>map</strong> - - - - - -</h3><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -20 -21 -22</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/accept.rb', line 20</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_map identifier id'>map</span> - <span class='rubyid_@@map ivar id'>@@map</span> <span class='opasgn op'>||=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="map=-class_method"> - - + (<tt>Object</tt>) <strong>map=</strong>(map) - - - - - -</h3><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -16 -17 -18</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/accept.rb', line 16</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_map identifier id'>map</span><span class='assign token'>=</span><span class='lparen token'>(</span><span class='rubyid_map identifier id'>map</span><span class='rparen token'>)</span> - <span class='rubyid_@@map ivar id'>@@map</span> <span class='assign token'>=</span> <span class='rubyid_map identifier id'>map</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - </div> - -</div> - - <div id="footer"> - Generated on Mon Nov 26 21:40:01 2012 by - <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.8.3 (ruby-1.9.3). -</div> - - </body> -</html>
\ No newline at end of file diff --git a/doc/Zero/Request/AcceptType.html b/doc/Zero/Request/AcceptType.html deleted file mode 100644 index 603d3d3..0000000 --- a/doc/Zero/Request/AcceptType.html +++ /dev/null @@ -1,403 +0,0 @@ -<!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> - Class: Zero::Request::AcceptType - - — Documentation by YARD 0.8.3 - -</title> - - <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" /> - - <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" /> - -<script type="text/javascript" charset="utf-8"> - hasFrames = window.top.frames.main ? true : false; - relpath = '../../'; - framesUrl = "../../frames.html#!" + escape(window.location.href); -</script> - - - <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script> - - <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script> - - - </head> - <body> - <div id="header"> - <div id="menu"> - - <a href="../../_index.html">Index (A)</a> » - <span class='title'><span class='object_link'><a href="../../Zero.html" title="Zero (module)">Zero</a></span></span> » <span class='title'><span class='object_link'><a href="../Request.html" title="Zero::Request (class)">Request</a></span></span> - » - <span class="title">AcceptType</span> - - - <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> -</div> - - <div id="search"> - - <a class="full_list_link" id="class_list_link" - href="../../class_list.html"> - Class List - </a> - - <a class="full_list_link" id="method_list_link" - href="../../method_list.html"> - Method List - </a> - - <a class="full_list_link" id="file_list_link" - href="../../file_list.html"> - File List - </a> - -</div> - <div class="clear"></div> - </div> - - <iframe id="search_frame"></iframe> - - <div id="content"><h1>Class: Zero::Request::AcceptType - - - -</h1> - -<dl class="box"> - - <dt class="r1">Inherits:</dt> - <dd class="r1"> - <span class="inheritName">Object</span> - - <ul class="fullTree"> - <li>Object</li> - - <li class="next">Zero::Request::AcceptType</li> - - </ul> - <a href="#" class="inheritanceTree">show all</a> - - </dd> - - - - - - - - - - <dt class="r2 last">Defined in:</dt> - <dd class="r2 last">lib/zero/request/accept_type.rb</dd> - -</dl> -<div class="clear"></div> - -<h2>Overview</h2><div class="docstring"> - <div class="discussion"> - -<p>This class provides an interface to access information of accept schemas.</p> - - - </div> -</div> -<div class="tags"> - - -</div> - <h2>Constant Summary</h2> - - <dl class="constants"> - - <dt id="MEDIA_TYPE_SEPERATOR-constant" class="">MEDIA_TYPE_SEPERATOR = - - </dt> - <dd><pre class="code"><span class='string val'>','</span> -</pre></dd> - - <dt id="MEDIA_PARAM_SEPERATOR-constant" class="">MEDIA_PARAM_SEPERATOR = - - </dt> - <dd><pre class="code"><span class='string val'>';'</span> -</pre></dd> - - <dt id="MEDIA_QUALITY_REGEX-constant" class="">MEDIA_QUALITY_REGEX = - - </dt> - <dd><pre class="code"><span class='regexp val'>/q=[01]\./</span> -</pre></dd> - - </dl> - - - - - - - - - - <h2> - Instance Method Summary - <small>(<a href="#" class="summary_toggle">collapse</a>)</small> - </h2> - - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#each-instance_method" title="#each (instance method)">- (Object) <strong>each</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>iterate over all media types.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#initialize-instance_method" title="#initialize (instance method)">- (AcceptType) <strong>initialize</strong>(string) </a> - - - - </span> - - - <span class="note title constructor">constructor</span> - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>create a new instance of AcceptType.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#preferred-instance_method" title="#preferred (instance method)">- (Object) <strong>preferred</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>return the preferred type.</p> -</div></span> - -</li> - - - </ul> - - -<div id="constructor_details" class="method_details_list"> - <h2>Constructor Details</h2> - - <div class="method_details first"> - <h3 class="signature first" id="initialize-instance_method"> - - - (<tt><span class='object_link'><a href="" title="Zero::Request::AcceptType (class)">AcceptType</a></span></tt>) <strong>initialize</strong>(string) - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>create a new instance of AcceptType</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -10 -11 -12 -13 -14 -15 -16</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/accept_type.rb', line 10</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_string identifier id'>string</span><span class='rparen token'>)</span> - <span class='rubyid_if if kw'>if</span> <span class='rubyid_string identifier id'>string</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span> - <span class='rubyid_@elements ivar id'>@elements</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span> - <span class='rubyid_else else kw'>else</span> - <span class='rubyid_@elements ivar id'>@elements</span> <span class='assign token'>=</span> <span class='rubyid_parse_elements identifier id'>parse_elements</span><span class='lparen token'>(</span><span class='rubyid_string identifier id'>string</span><span class='rparen token'>)</span> - <span class='rubyid_end end kw'>end</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - -</div> - - - <div id="instance_method_details" class="method_details_list"> - <h2>Instance Method Details</h2> - - - <div class="method_details first"> - <h3 class="signature first" id="each-instance_method"> - - - (<tt>Object</tt>) <strong>each</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>iterate over all media types</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -25 -26 -27</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/accept_type.rb', line 25</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_each identifier id'>each</span> - <span class='rubyid_@elements ivar id'>@elements</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_element identifier id'>element</span><span class='bitor op'>|</span> <span class='rubyid_yield yield kw'>yield</span> <span class='rubyid_element identifier id'>element</span><span class='rbrace token'>}</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="preferred-instance_method"> - - - (<tt>Object</tt>) <strong>preferred</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>return the preferred type</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'></span> - - - - - <div class='inline'> -<p>String the preferred media type</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -20 -21 -22</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/accept_type.rb', line 20</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_preferred identifier id'>preferred</span> - <span class='rubyid_@elements ivar id'>@elements</span><span class='dot token'>.</span><span class='rubyid_first identifier id'>first</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - </div> - -</div> - - <div id="footer"> - Generated on Mon Nov 26 21:40:02 2012 by - <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.8.3 (ruby-1.9.3). -</div> - - </body> -</html>
\ No newline at end of file diff --git a/doc/Zero/Request/Client.html b/doc/Zero/Request/Client.html deleted file mode 100644 index f2e733d..0000000 --- a/doc/Zero/Request/Client.html +++ /dev/null @@ -1,579 +0,0 @@ -<!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> - Class: Zero::Request::Client - - — Documentation by YARD 0.8.3 - -</title> - - <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" /> - - <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" /> - -<script type="text/javascript" charset="utf-8"> - hasFrames = window.top.frames.main ? true : false; - relpath = '../../'; - framesUrl = "../../frames.html#!" + escape(window.location.href); -</script> - - - <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script> - - <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script> - - - </head> - <body> - <div id="header"> - <div id="menu"> - - <a href="../../_index.html">Index (C)</a> » - <span class='title'><span class='object_link'><a href="../../Zero.html" title="Zero (module)">Zero</a></span></span> » <span class='title'><span class='object_link'><a href="../Request.html" title="Zero::Request (class)">Request</a></span></span> - » - <span class="title">Client</span> - - - <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> -</div> - - <div id="search"> - - <a class="full_list_link" id="class_list_link" - href="../../class_list.html"> - Class List - </a> - - <a class="full_list_link" id="method_list_link" - href="../../method_list.html"> - Method List - </a> - - <a class="full_list_link" id="file_list_link" - href="../../file_list.html"> - File List - </a> - -</div> - <div class="clear"></div> - </div> - - <iframe id="search_frame"></iframe> - - <div id="content"><h1>Class: Zero::Request::Client - - - -</h1> - -<dl class="box"> - - <dt class="r1">Inherits:</dt> - <dd class="r1"> - <span class="inheritName">Object</span> - - <ul class="fullTree"> - <li>Object</li> - - <li class="next">Zero::Request::Client</li> - - </ul> - <a href="#" class="inheritanceTree">show all</a> - - </dd> - - - - - - - - - - <dt class="r2 last">Defined in:</dt> - <dd class="r2 last">lib/zero/request/client.rb</dd> - -</dl> -<div class="clear"></div> - -<h2>Overview</h2><div class="docstring"> - <div class="discussion"> - -<p>This class represents all information about the client of a request.</p> - - - </div> -</div> -<div class="tags"> - - -</div> - <h2>Constant Summary</h2> - - <dl class="constants"> - - <dt id="KEY_REMOTE_ADDR-constant" class="">KEY_REMOTE_ADDR = - <div class="docstring"> - <div class="discussion"> - -<p>the key for the ip of the client</p> - - - </div> -</div> -<div class="tags"> - - -</div> - </dt> - <dd><pre class="code"><span class='string val'>'REMOTE_ADDR'</span> -</pre></dd> - - <dt id="KEY_REMOTE_HOST-constant" class="">KEY_REMOTE_HOST = - <div class="docstring"> - <div class="discussion"> - -<p>the key for the hostname</p> - - - </div> -</div> -<div class="tags"> - - -</div> - </dt> - <dd><pre class="code"><span class='string val'>'REMOTE_HOST'</span> -</pre></dd> - - <dt id="KEY_USER_AGENT-constant" class="">KEY_USER_AGENT = - <div class="docstring"> - <div class="discussion"> - -<p>the key for the user agent</p> - - - </div> -</div> -<div class="tags"> - - -</div> - </dt> - <dd><pre class="code"><span class='string val'>'HTTP_USER_AGENT'</span> -</pre></dd> - - </dl> - - - - - - <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2> - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#address-instance_method" title="#address (instance method)">- (String) <strong>address</strong> </a> - - - - </span> - - - - - <span class="note title readonly">readonly</span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>the ip address of the client.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#hostname-instance_method" title="#hostname (instance method)">- (String) <strong>hostname</strong> </a> - - - - </span> - - - - - <span class="note title readonly">readonly</span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>the hostname of the client.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#user_agent-instance_method" title="#user_agent (instance method)">- (String) <strong>user_agent</strong> </a> - - - - </span> - - - - - <span class="note title readonly">readonly</span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>the user agent of the client.</p> -</div></span> - -</li> - - - </ul> - - - - - - <h2> - Instance Method Summary - <small>(<a href="#" class="summary_toggle">collapse</a>)</small> - </h2> - - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#initialize-instance_method" title="#initialize (instance method)">- (Client) <strong>initialize</strong>(environment) </a> - - - - </span> - - - <span class="note title constructor">constructor</span> - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>creates a new client with the data of the request environment.</p> -</div></span> - -</li> - - - </ul> - - -<div id="constructor_details" class="method_details_list"> - <h2>Constructor Details</h2> - - <div class="method_details first"> - <h3 class="signature first" id="initialize-instance_method"> - - - (<tt><span class='object_link'><a href="" title="Zero::Request::Client (class)">Client</a></span></tt>) <strong>initialize</strong>(environment) - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>creates a new client with the data of the request environment</p> - - - </div> -</div> -<div class="tags"> - <p class="tag_title">Parameters:</p> -<ul class="param"> - - <li> - - <span class='name'>environment</span> - - - <span class='type'></span> - - - - — - <div class='inline'> -<p>a hash representation of the request</p> -</div> - - </li> - -</ul> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -14 -15 -16 -17 -18</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/client.rb', line 14</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_environment identifier id'>environment</span><span class='rparen token'>)</span> - <span class='rubyid_@address ivar id'>@address</span> <span class='assign token'>=</span> <span class='rubyid_environment identifier id'>environment</span><span class='lbrack token'>[</span><span class='rubyid_KEY_REMOTE_ADDR constant id'>KEY_REMOTE_ADDR</span><span class='rbrack token'>]</span> - <span class='rubyid_@hostname ivar id'>@hostname</span> <span class='assign token'>=</span> <span class='rubyid_environment identifier id'>environment</span><span class='lbrack token'>[</span><span class='rubyid_KEY_REMOTE_HOST constant id'>KEY_REMOTE_HOST</span><span class='rbrack token'>]</span> - <span class='rubyid_@user_agent ivar id'>@user_agent</span> <span class='assign token'>=</span> <span class='rubyid_environment identifier id'>environment</span><span class='lbrack token'>[</span><span class='rubyid_KEY_USER_AGENT constant id'>KEY_USER_AGENT</span><span class='rbrack token'>]</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - -</div> - - <div id="instance_attr_details" class="attr_details"> - <h2>Instance Attribute Details</h2> - - - <span id=""></span> - <div class="method_details first"> - <h3 class="signature first" id="address-instance_method"> - - - (<tt>String</tt>) <strong>address</strong> <span class="extras">(readonly)</span> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>the ip address of the client</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>String</tt>)</span> - - - - — - <div class='inline'> -<p>the address of the client</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -22 -23 -24</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/client.rb', line 22</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_address identifier id'>address</span> - <span class='rubyid_@address ivar id'>@address</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - - <span id=""></span> - <div class="method_details "> - <h3 class="signature " id="hostname-instance_method"> - - - (<tt>String</tt>) <strong>hostname</strong> <span class="extras">(readonly)</span> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>the hostname of the client</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>String</tt>)</span> - - - - — - <div class='inline'> -<p>the hostname of the client</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -25 -26 -27</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/client.rb', line 25</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_hostname identifier id'>hostname</span> - <span class='rubyid_@hostname ivar id'>@hostname</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - - <span id=""></span> - <div class="method_details "> - <h3 class="signature " id="user_agent-instance_method"> - - - (<tt>String</tt>) <strong>user_agent</strong> <span class="extras">(readonly)</span> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>the user agent of the client</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>String</tt>)</span> - - - - — - <div class='inline'> -<p>the user agent of the client</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -28 -29 -30</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/client.rb', line 28</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_user_agent identifier id'>user_agent</span> - <span class='rubyid_@user_agent ivar id'>@user_agent</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - </div> - - -</div> - - <div id="footer"> - Generated on Mon Nov 26 21:40:01 2012 by - <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.8.3 (ruby-1.9.3). -</div> - - </body> -</html>
\ No newline at end of file diff --git a/doc/Zero/Request/Parameter.html b/doc/Zero/Request/Parameter.html deleted file mode 100644 index e8c170c..0000000 --- a/doc/Zero/Request/Parameter.html +++ /dev/null @@ -1,489 +0,0 @@ -<!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> - Class: Zero::Request::Parameter - - — Documentation by YARD 0.8.3 - -</title> - - <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" /> - - <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" /> - -<script type="text/javascript" charset="utf-8"> - hasFrames = window.top.frames.main ? true : false; - relpath = '../../'; - framesUrl = "../../frames.html#!" + escape(window.location.href); -</script> - - - <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script> - - <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script> - - - </head> - <body> - <div id="header"> - <div id="menu"> - - <a href="../../_index.html">Index (P)</a> » - <span class='title'><span class='object_link'><a href="../../Zero.html" title="Zero (module)">Zero</a></span></span> » <span class='title'><span class='object_link'><a href="../Request.html" title="Zero::Request (class)">Request</a></span></span> - » - <span class="title">Parameter</span> - - - <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> -</div> - - <div id="search"> - - <a class="full_list_link" id="class_list_link" - href="../../class_list.html"> - Class List - </a> - - <a class="full_list_link" id="method_list_link" - href="../../method_list.html"> - Method List - </a> - - <a class="full_list_link" id="file_list_link" - href="../../file_list.html"> - File List - </a> - -</div> - <div class="clear"></div> - </div> - - <iframe id="search_frame"></iframe> - - <div id="content"><h1>Class: Zero::Request::Parameter - - - -</h1> - -<dl class="box"> - - <dt class="r1">Inherits:</dt> - <dd class="r1"> - <span class="inheritName">Object</span> - - <ul class="fullTree"> - <li>Object</li> - - <li class="next">Zero::Request::Parameter</li> - - </ul> - <a href="#" class="inheritanceTree">show all</a> - - </dd> - - - - - - - - - - <dt class="r2 last">Defined in:</dt> - <dd class="r2 last">lib/zero/request/parameter.rb</dd> - -</dl> -<div class="clear"></div> - -<h2>Overview</h2><div class="docstring"> - <div class="discussion"> - -<p>represents all parameter set in a session</p> - -<p>This class holds all parameters available in the rack environment, split on -query and payload parameters.</p> - - - </div> -</div> -<div class="tags"> - - -</div> - <h2>Constant Summary</h2> - - <dl class="constants"> - - <dt id="ENV_KEY_QUERY-constant" class="">ENV_KEY_QUERY = - <div class="docstring"> - <div class="discussion"> - -<p>they key for the query string</p> - - - </div> -</div> -<div class="tags"> - - -</div> - </dt> - <dd><pre class="code"><span class='string val'>'QUERY_STRING'</span> -</pre></dd> - - <dt id="ENV_KEY_PAYLOAD-constant" class="">ENV_KEY_PAYLOAD = - <div class="docstring"> - <div class="discussion"> - -<p>the key for the payload</p> - - - </div> -</div> -<div class="tags"> - - -</div> - </dt> - <dd><pre class="code"><span class='string val'>'rack.input'</span> -</pre></dd> - - <dt id="ENV_KEY_CONTENT_TYPE-constant" class="">ENV_KEY_CONTENT_TYPE = - <div class="docstring"> - <div class="discussion"> - -<p>the key for the content type</p> - - - </div> -</div> -<div class="tags"> - - -</div> - </dt> - <dd><pre class="code"><span class='string val'>'CONTENT_TYPE'</span> -</pre></dd> - - <dt id="PAYLOAD_CONTENT_TYPES-constant" class="">PAYLOAD_CONTENT_TYPES = - <div class="docstring"> - <div class="discussion"> - -<p>all content types which used for using the body as a parameter input</p> - - - </div> -</div> -<div class="tags"> - - -</div> - </dt> - <dd><pre class="code"><span class='lbrack token'>[</span> - <span class='string val'>'application/x-www-form-urlencoded'</span><span class='comma token'>,</span> - <span class='string val'>'multipart/form-data'</span> -<span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_to_set identifier id'>to_set</span> -</pre></dd> - - </dl> - - - - - - <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2> - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#payload-instance_method" title="#payload (instance method)">- (Object) <strong>payload</strong> </a> - - - - (also: #post) - - </span> - - - - - <span class="note title readonly">readonly</span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>get the payload or form data parameters.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#query-instance_method" title="#query (instance method)">- (Object) <strong>query</strong> </a> - - - - (also: #get) - - </span> - - - - - <span class="note title readonly">readonly</span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>get the query parameters.</p> -</div></span> - -</li> - - - </ul> - - - - - - <h2> - Instance Method Summary - <small>(<a href="#" class="summary_toggle">collapse</a>)</small> - </h2> - - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#initialize-instance_method" title="#initialize (instance method)">- (Parameter) <strong>initialize</strong>(environment) </a> - - - - </span> - - - <span class="note title constructor">constructor</span> - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>creates a new parameter instance.</p> -</div></span> - -</li> - - - </ul> - - -<div id="constructor_details" class="method_details_list"> - <h2>Constructor Details</h2> - - <div class="method_details first"> - <h3 class="signature first" id="initialize-instance_method"> - - - (<tt><span class='object_link'><a href="" title="Zero::Request::Parameter (class)">Parameter</a></span></tt>) <strong>initialize</strong>(environment) - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>creates a new parameter instance</p> - -<p>This should never be called directly, as it will be generated for you. This -instance gives you the options to get query parameters (mostly called GET -parameters) and payload parameters (or POST parameters).</p> - - - </div> -</div> -<div class="tags"> - <p class="tag_title">Parameters:</p> -<ul class="param"> - - <li> - - <span class='name'>environment</span> - - - <span class='type'>(<tt>Hash</tt>)</span> - - - - — - <div class='inline'> -<p>the rack environment</p> -</div> - - </li> - -</ul> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -37 -38 -39 -40</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/parameter.rb', line 37</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_environment identifier id'>environment</span><span class='rparen token'>)</span> - <span class='rubyid_@query ivar id'>@query</span> <span class='assign token'>=</span> <span class='rubyid_extract_query_params identifier id'>extract_query_params</span><span class='lparen token'>(</span><span class='rubyid_environment identifier id'>environment</span><span class='rparen token'>)</span> - <span class='rubyid_@payload ivar id'>@payload</span> <span class='assign token'>=</span> <span class='rubyid_extract_payload_params identifier id'>extract_payload_params</span><span class='lparen token'>(</span><span class='rubyid_environment identifier id'>environment</span><span class='rparen token'>)</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - -</div> - - <div id="instance_attr_details" class="attr_details"> - <h2>Instance Attribute Details</h2> - - - <span id=""></span> - <div class="method_details first"> - <h3 class="signature first" id="payload-instance_method"> - - - (<tt>Object</tt>) <strong>payload</strong> <span class="extras">(readonly)</span> - - - - <span class="aliases">Also known as: - <span class="names"><span id='post-instance_method'>post</span></span> - </span> - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>get the payload or form data parameters</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -28 -29 -30</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/parameter.rb', line 28</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_payload identifier id'>payload</span> - <span class='rubyid_@payload ivar id'>@payload</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - - <span id=""></span> - <div class="method_details "> - <h3 class="signature " id="query-instance_method"> - - - (<tt>Object</tt>) <strong>query</strong> <span class="extras">(readonly)</span> - - - - <span class="aliases">Also known as: - <span class="names"><span id='get-instance_method'>get</span></span> - </span> - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>get the query parameters</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -24 -25 -26</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/parameter.rb', line 24</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_query identifier id'>query</span> - <span class='rubyid_@query ivar id'>@query</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - </div> - - -</div> - - <div id="footer"> - Generated on Mon Nov 26 21:40:01 2012 by - <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.8.3 (ruby-1.9.3). -</div> - - </body> -</html>
\ No newline at end of file diff --git a/doc/Zero/Request/Server.html b/doc/Zero/Request/Server.html deleted file mode 100644 index 2a187d8..0000000 --- a/doc/Zero/Request/Server.html +++ /dev/null @@ -1,687 +0,0 @@ -<!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> - Class: Zero::Request::Server - - — Documentation by YARD 0.8.3 - -</title> - - <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" /> - - <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" /> - -<script type="text/javascript" charset="utf-8"> - hasFrames = window.top.frames.main ? true : false; - relpath = '../../'; - framesUrl = "../../frames.html#!" + escape(window.location.href); -</script> - - - <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script> - - <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script> - - - </head> - <body> - <div id="header"> - <div id="menu"> - - <a href="../../_index.html">Index (S)</a> » - <span class='title'><span class='object_link'><a href="../../Zero.html" title="Zero (module)">Zero</a></span></span> » <span class='title'><span class='object_link'><a href="../Request.html" title="Zero::Request (class)">Request</a></span></span> - » - <span class="title">Server</span> - - - <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> -</div> - - <div id="search"> - - <a class="full_list_link" id="class_list_link" - href="../../class_list.html"> - Class List - </a> - - <a class="full_list_link" id="method_list_link" - href="../../method_list.html"> - Method List - </a> - - <a class="full_list_link" id="file_list_link" - href="../../file_list.html"> - File List - </a> - -</div> - <div class="clear"></div> - </div> - - <iframe id="search_frame"></iframe> - - <div id="content"><h1>Class: Zero::Request::Server - - - -</h1> - -<dl class="box"> - - <dt class="r1">Inherits:</dt> - <dd class="r1"> - <span class="inheritName">Object</span> - - <ul class="fullTree"> - <li>Object</li> - - <li class="next">Zero::Request::Server</li> - - </ul> - <a href="#" class="inheritanceTree">show all</a> - - </dd> - - - - - - - - - - <dt class="r2 last">Defined in:</dt> - <dd class="r2 last">lib/zero/request/server.rb</dd> - -</dl> -<div class="clear"></div> - -<h2>Overview</h2><div class="docstring"> - <div class="discussion"> - -<p>This class represents all server related information of a request.</p> - - - </div> -</div> -<div class="tags"> - - -</div> - <h2>Constant Summary</h2> - - <dl class="constants"> - - <dt id="KEY_SERVER_NAME-constant" class="">KEY_SERVER_NAME = - <div class="docstring"> - <div class="discussion"> - <p class="note private"> - <strong>This constant is part of a private API.</strong> - You should avoid using this constant if possible, as it may be removed or be changed in the future. -</p> - -<p>the key for the server name</p> - - - </div> -</div> -<div class="tags"> - - -</div> - </dt> - <dd><pre class="code"><span class='string val'>'SERVER_NAME'</span> -</pre></dd> - - <dt id="KEY_SERVER_PORT-constant" class="">KEY_SERVER_PORT = - <div class="docstring"> - <div class="discussion"> - <p class="note private"> - <strong>This constant is part of a private API.</strong> - You should avoid using this constant if possible, as it may be removed or be changed in the future. -</p> - -<p>the key for the server port</p> - - - </div> -</div> -<div class="tags"> - - -</div> - </dt> - <dd><pre class="code"><span class='string val'>'SERVER_PORT'</span> -</pre></dd> - - <dt id="KEY_SERVER_PROTOCOL-constant" class="">KEY_SERVER_PROTOCOL = - <div class="docstring"> - <div class="discussion"> - <p class="note private"> - <strong>This constant is part of a private API.</strong> - You should avoid using this constant if possible, as it may be removed or be changed in the future. -</p> - -<p>the key for the server protocol</p> - - - </div> -</div> -<div class="tags"> - - -</div> - </dt> - <dd><pre class="code"><span class='string val'>'SERVER_PROTOCOL'</span> -</pre></dd> - - <dt id="KEY_SERVER_SOFTWARE-constant" class="">KEY_SERVER_SOFTWARE = - <div class="docstring"> - <div class="discussion"> - <p class="note private"> - <strong>This constant is part of a private API.</strong> - You should avoid using this constant if possible, as it may be removed or be changed in the future. -</p> - -<p>the key for the server software</p> - - - </div> -</div> -<div class="tags"> - - -</div> - </dt> - <dd><pre class="code"><span class='string val'>'SERVER_SOFTWARE'</span> -</pre></dd> - - </dl> - - - - - - <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2> - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#hostname-instance_method" title="#hostname (instance method)">- (String) <strong>hostname</strong> </a> - - - - </span> - - - - - <span class="note title readonly">readonly</span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>get the hostname of the server.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#port-instance_method" title="#port (instance method)">- (Numeric) <strong>port</strong> </a> - - - - </span> - - - - - <span class="note title readonly">readonly</span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>get the port.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#protocol-instance_method" title="#protocol (instance method)">- (String) <strong>protocol</strong> </a> - - - - </span> - - - - - <span class="note title readonly">readonly</span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>get the protocol of the server (normally it should be HTTP/1.1).</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#software-instance_method" title="#software (instance method)">- (String) <strong>software</strong> </a> - - - - </span> - - - - - <span class="note title readonly">readonly</span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>get the server software.</p> -</div></span> - -</li> - - - </ul> - - - - - - <h2> - Instance Method Summary - <small>(<a href="#" class="summary_toggle">collapse</a>)</small> - </h2> - - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#initialize-instance_method" title="#initialize (instance method)">- (Server) <strong>initialize</strong>(environment) </a> - - - - </span> - - - <span class="note title constructor">constructor</span> - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>This creates a new server instance extracting all server related.</p> -</div></span> - -</li> - - - </ul> - - -<div id="constructor_details" class="method_details_list"> - <h2>Constructor Details</h2> - - <div class="method_details first"> - <h3 class="signature first" id="initialize-instance_method"> - - - (<tt><span class='object_link'><a href="" title="Zero::Request::Server (class)">Server</a></span></tt>) <strong>initialize</strong>(environment) - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>This creates a new server instance extracting all server related</p> - -<pre class="code ruby18"><code>information from the environment.</code></pre> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -20 -21 -22 -23 -24 -25</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/server.rb', line 20</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_environment identifier id'>environment</span><span class='rparen token'>)</span> - <span class='rubyid_@hostname ivar id'>@hostname</span> <span class='assign token'>=</span> <span class='rubyid_environment identifier id'>environment</span><span class='lbrack token'>[</span><span class='rubyid_KEY_SERVER_NAME constant id'>KEY_SERVER_NAME</span><span class='rbrack token'>]</span> - <span class='rubyid_@port ivar id'>@port</span> <span class='assign token'>=</span> <span class='rubyid_environment identifier id'>environment</span><span class='lbrack token'>[</span><span class='rubyid_KEY_SERVER_PORT constant id'>KEY_SERVER_PORT</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_to_i identifier id'>to_i</span> - <span class='rubyid_@protocol ivar id'>@protocol</span> <span class='assign token'>=</span> <span class='rubyid_environment identifier id'>environment</span><span class='lbrack token'>[</span><span class='rubyid_KEY_SERVER_PROTOCOL constant id'>KEY_SERVER_PROTOCOL</span><span class='rbrack token'>]</span> - <span class='rubyid_@software ivar id'>@software</span> <span class='assign token'>=</span> <span class='rubyid_environment identifier id'>environment</span><span class='lbrack token'>[</span><span class='rubyid_KEY_SERVER_SOFTWARE constant id'>KEY_SERVER_SOFTWARE</span><span class='rbrack token'>]</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - -</div> - - <div id="instance_attr_details" class="attr_details"> - <h2>Instance Attribute Details</h2> - - - <span id=""></span> - <div class="method_details first"> - <h3 class="signature first" id="hostname-instance_method"> - - - (<tt>String</tt>) <strong>hostname</strong> <span class="extras">(readonly)</span> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>get the hostname of the server</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>String</tt>)</span> - - - - — - <div class='inline'> -<p>the hostname</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -32 -33 -34</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/server.rb', line 32</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_hostname identifier id'>hostname</span> - <span class='rubyid_@hostname ivar id'>@hostname</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - - <span id=""></span> - <div class="method_details "> - <h3 class="signature " id="port-instance_method"> - - - (<tt>Numeric</tt>) <strong>port</strong> <span class="extras">(readonly)</span> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>get the port</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>Numeric</tt>)</span> - - - - — - <div class='inline'> -<p>the port</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -29 -30 -31</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/server.rb', line 29</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_port identifier id'>port</span> - <span class='rubyid_@port ivar id'>@port</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - - <span id=""></span> - <div class="method_details "> - <h3 class="signature " id="protocol-instance_method"> - - - (<tt>String</tt>) <strong>protocol</strong> <span class="extras">(readonly)</span> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>get the protocol of the server (normally it should be HTTP/1.1)</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>String</tt>)</span> - - - - — - <div class='inline'> -<p>the protocol</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -35 -36 -37</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/server.rb', line 35</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_protocol identifier id'>protocol</span> - <span class='rubyid_@protocol ivar id'>@protocol</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - - <span id=""></span> - <div class="method_details "> - <h3 class="signature " id="software-instance_method"> - - - (<tt>String</tt>) <strong>software</strong> <span class="extras">(readonly)</span> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>get the server software</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>String</tt>)</span> - - - - — - <div class='inline'> -<p>the server software name</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -38 -39 -40</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/request/server.rb', line 38</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_software identifier id'>software</span> - <span class='rubyid_@software ivar id'>@software</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - </div> - - -</div> - - <div id="footer"> - Generated on Mon Nov 26 21:40:01 2012 by - <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.8.3 (ruby-1.9.3). -</div> - - </body> -</html>
\ No newline at end of file diff --git a/doc/Zero/Response.html b/doc/Zero/Response.html deleted file mode 100644 index 6ed9127..0000000 --- a/doc/Zero/Response.html +++ /dev/null @@ -1,723 +0,0 @@ -<!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> - Class: Zero::Response - - — Documentation by YARD 0.8.3 - -</title> - - <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" /> - - <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" /> - -<script type="text/javascript" charset="utf-8"> - hasFrames = window.top.frames.main ? true : false; - relpath = '../'; - framesUrl = "../frames.html#!" + escape(window.location.href); -</script> - - - <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script> - - <script type="text/javascript" charset="utf-8" src="../js/app.js"></script> - - - </head> - <body> - <div id="header"> - <div id="menu"> - - <a href="../_index.html">Index (R)</a> » - <span class='title'><span class='object_link'><a href="../Zero.html" title="Zero (module)">Zero</a></span></span> - » - <span class="title">Response</span> - - - <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> -</div> - - <div id="search"> - - <a class="full_list_link" id="class_list_link" - href="../class_list.html"> - Class List - </a> - - <a class="full_list_link" id="method_list_link" - href="../method_list.html"> - Method List - </a> - - <a class="full_list_link" id="file_list_link" - href="../file_list.html"> - File List - </a> - -</div> - <div class="clear"></div> - </div> - - <iframe id="search_frame"></iframe> - - <div id="content"><h1>Class: Zero::Response - - - -</h1> - -<dl class="box"> - - <dt class="r1">Inherits:</dt> - <dd class="r1"> - <span class="inheritName">Object</span> - - <ul class="fullTree"> - <li>Object</li> - - <li class="next">Zero::Response</li> - - </ul> - <a href="#" class="inheritanceTree">show all</a> - - </dd> - - - - - - - - - - <dt class="r2 last">Defined in:</dt> - <dd class="r2 last">lib/zero/response.rb</dd> - -</dl> -<div class="clear"></div> - -<h2>Overview</h2><div class="docstring"> - <div class="discussion"> - -<p>This is the representation of a response</p> - - - </div> -</div> -<div class="tags"> - - -</div> - - - - <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2> - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#body-instance_method" title="#body (instance method)">- (Object) <strong>body</strong> </a> - - - - </span> - - - - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>Returns the value of attribute body.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#header-instance_method" title="#header (instance method)">- (Object) <strong>header</strong> </a> - - - - </span> - - - - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>Returns the value of attribute header.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#status-instance_method" title="#status (instance method)">- (Object) <strong>status</strong> </a> - - - - </span> - - - - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>Returns the value of attribute status.</p> -</div></span> - -</li> - - - </ul> - - - - - - <h2> - Instance Method Summary - <small>(<a href="#" class="summary_toggle">collapse</a>)</small> - </h2> - - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#content_length-instance_method" title="#content_length (instance method)">- (Object) <strong>content_length</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>Sets the content length header to the current length of the body Also -creates one, if it does not exists.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#content_type%3D-instance_method" title="#content_type= (instance method)">- (Object) <strong>content_type=</strong>(value) </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>Sets the content type header to the given value Also creates it, if it does -not exists.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#initialize-instance_method" title="#initialize (instance method)">- (Response) <strong>initialize</strong> </a> - - - - </span> - - - <span class="note title constructor">constructor</span> - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>Constructor Sets default status code to 200.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#to_a-instance_method" title="#to_a (instance method)">- (Array) <strong>to_a</strong> </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>Returns the data of the response as an array:</p> -<dl class="rdoc-list label-list"><dt>status, header, body -<dd> -<p>to be usable by any webserver.</p> -</dd></dl> -</div></span> - -</li> - - - </ul> - - -<div id="constructor_details" class="method_details_list"> - <h2>Constructor Details</h2> - - <div class="method_details first"> - <h3 class="signature first" id="initialize-instance_method"> - - - (<tt><span class='object_link'><a href="" title="Zero::Response (class)">Response</a></span></tt>) <strong>initialize</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>Constructor Sets default status code to 200.</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -12 -13 -14 -15 -16</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/response.rb', line 12</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span> - <span class='rubyid_@status ivar id'>@status</span> <span class='assign token'>=</span> <span class='integer val'>200</span> - <span class='rubyid_@header ivar id'>@header</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span> - <span class='rubyid_@body ivar id'>@body</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - -</div> - - <div id="instance_attr_details" class="attr_details"> - <h2>Instance Attribute Details</h2> - - - <span id="body=-instance_method"></span> - <div class="method_details first"> - <h3 class="signature first" id="body-instance_method"> - - - (<tt>Object</tt>) <strong>body</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>Returns the value of attribute body</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -7 -8 -9</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/response.rb', line 7</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_body identifier id'>body</span> - <span class='rubyid_@body ivar id'>@body</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - - <span id="header=-instance_method"></span> - <div class="method_details "> - <h3 class="signature " id="header-instance_method"> - - - (<tt>Object</tt>) <strong>header</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>Returns the value of attribute header</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -7 -8 -9</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/response.rb', line 7</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_header identifier id'>header</span> - <span class='rubyid_@header ivar id'>@header</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - - <span id="status=-instance_method"></span> - <div class="method_details "> - <h3 class="signature " id="status-instance_method"> - - - (<tt>Object</tt>) <strong>status</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>Returns the value of attribute status</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -6 -7 -8</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/response.rb', line 6</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_status identifier id'>status</span> - <span class='rubyid_@status ivar id'>@status</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - </div> - - - <div id="instance_method_details" class="method_details_list"> - <h2>Instance Method Details</h2> - - - <div class="method_details first"> - <h3 class="signature first" id="content_length-instance_method"> - - - (<tt>Object</tt>) <strong>content_length</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>Sets the content length header to the current length of the body Also -creates one, if it does not exists</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -57 -58 -59</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/response.rb', line 57</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_content_length identifier id'>content_length</span> - <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_header identifier id'>header</span><span class='lbrack token'>[</span><span class='string val'>'Content-Length'</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_body identifier id'>body</span><span class='dot token'>.</span><span class='rubyid_join identifier id'>join</span><span class='dot token'>.</span><span class='rubyid_bytesize identifier id'>bytesize</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="content_type=-instance_method"> - - - (<tt>Object</tt>) <strong>content_type=</strong>(value) - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>Sets the content type header to the given value Also creates it, if it does -not exists</p> - - - </div> -</div> -<div class="tags"> - <p class="tag_title">Parameters:</p> -<ul class="param"> - - <li> - - <span class='name'>value</span> - - - <span class='type'>(<tt>String</tt>)</span> - - - - — - <div class='inline'> -<p>Content-Type tp set</p> -</div> - - </li> - -</ul> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -66 -67 -68</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/response.rb', line 66</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_content_type= identifier id'>content_type=</span><span class='lparen token'>(</span><span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span> - <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_header identifier id'>header</span><span class='lbrack token'>[</span><span class='string val'>'Content-Type'</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_value identifier id'>value</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="to_a-instance_method"> - - - (<tt>Array</tt>) <strong>to_a</strong> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>Returns the data of the response as an array:</p> -<dl class="rdoc-list label-list"><dt>status, header, body -<dd> -<p>to be usable by any webserver.</p> - -<p>Sets the Content-Type to 'text/html', if it's not already set. Sets the -Content-Length, if it's not already set. (Won't fix wrong lengths!) Removes -Content-Type, Content-Length and body on status code 204 and 304.</p> -</dd></dl> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>Array</tt>)</span> - - - - — - <div class='inline'> -<p>Usable by webservers</p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/response.rb', line 38</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_to_a identifier id'>to_a</span> - <span class='comment val'># Remove content length and body, on status 204 and 304</span> - <span class='rubyid_if if kw'>if</span> <span class='rubyid_status identifier id'>status</span> <span class='eq op'>==</span> <span class='integer val'>204</span> <span class='rubyid_or or kw'>or</span> <span class='rubyid_status identifier id'>status</span> <span class='eq op'>==</span> <span class='integer val'>304</span> - <span class='rubyid_header identifier id'>header</span><span class='dot token'>.</span><span class='rubyid_delete identifier id'>delete</span><span class='lparen token'>(</span><span class='string val'>'Content-Length'</span><span class='rparen token'>)</span> - <span class='rubyid_header identifier id'>header</span><span class='dot token'>.</span><span class='rubyid_delete identifier id'>delete</span><span class='lparen token'>(</span><span class='string val'>'Content-Type'</span><span class='rparen token'>)</span> - <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_body identifier id'>body</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span> - <span class='rubyid_else else kw'>else</span> - <span class='comment val'># Set content length, if not already set</span> - <span class='rubyid_content_length identifier id'>content_length</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_header identifier id'>header</span><span class='dot token'>.</span><span class='rubyid_has_key? fid id'>has_key?</span> <span class='string val'>'Content-Length'</span> - <span class='comment val'># Set content type, if not already set</span> - <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_content_type identifier id'>content_type</span> <span class='assign token'>=</span> <span class='string val'>'text/html'</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_header identifier id'>header</span><span class='dot token'>.</span><span class='rubyid_has_key? fid id'>has_key?</span> <span class='string val'>'Content-Type'</span> - <span class='rubyid_end end kw'>end</span> - - <span class='lbrack token'>[</span><span class='rubyid_status identifier id'>status</span><span class='comma token'>,</span> <span class='rubyid_header identifier id'>header</span><span class='comma token'>,</span> <span class='rubyid_body identifier id'>body</span><span class='rbrack token'>]</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - </div> - -</div> - - <div id="footer"> - Generated on Mon Nov 26 21:40:01 2012 by - <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.8.3 (ruby-1.9.3). -</div> - - </body> -</html>
\ No newline at end of file diff --git a/doc/Zero/Router.html b/doc/Zero/Router.html deleted file mode 100644 index 8f95463..0000000 --- a/doc/Zero/Router.html +++ /dev/null @@ -1,333 +0,0 @@ -<!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> - Class: Zero::Router - - — Documentation by YARD 0.8.3 - -</title> - - <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" /> - - <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" /> - -<script type="text/javascript" charset="utf-8"> - hasFrames = window.top.frames.main ? true : false; - relpath = '../'; - framesUrl = "../frames.html#!" + escape(window.location.href); -</script> - - - <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script> - - <script type="text/javascript" charset="utf-8" src="../js/app.js"></script> - - - </head> - <body> - <div id="header"> - <div id="menu"> - - <a href="../_index.html">Index (R)</a> » - <span class='title'><span class='object_link'><a href="../Zero.html" title="Zero (module)">Zero</a></span></span> - » - <span class="title">Router</span> - - - <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> -</div> - - <div id="search"> - - <a class="full_list_link" id="class_list_link" - href="../class_list.html"> - Class List - </a> - - <a class="full_list_link" id="method_list_link" - href="../method_list.html"> - Method List - </a> - - <a class="full_list_link" id="file_list_link" - href="../file_list.html"> - File List - </a> - -</div> - <div class="clear"></div> - </div> - - <iframe id="search_frame"></iframe> - - <div id="content"><h1>Class: Zero::Router - - - -</h1> - -<dl class="box"> - - <dt class="r1">Inherits:</dt> - <dd class="r1"> - <span class="inheritName">Object</span> - - <ul class="fullTree"> - <li>Object</li> - - <li class="next">Zero::Router</li> - - </ul> - <a href="#" class="inheritanceTree">show all</a> - - </dd> - - - - - - - - - - <dt class="r2 last">Defined in:</dt> - <dd class="r2 last">lib/zero/router.rb</dd> - -</dl> -<div class="clear"></div> - - - <h2>Constant Summary</h2> - - <dl class="constants"> - - <dt id="VARIABLE_MATCH-constant" class="">VARIABLE_MATCH = - <div class="docstring"> - <div class="discussion"> - -<p>match for variables in routes</p> - - - </div> -</div> -<div class="tags"> - - -</div> - </dt> - <dd><pre class="code"><span class='regexp val'>%r{:(\w+)[^/]?}</span> -</pre></dd> - - <dt id="VARIABLE_REGEX-constant" class="">VARIABLE_REGEX = - <div class="docstring"> - <div class="discussion"> - -<p>the replacement string to make it an regex</p> - - - </div> -</div> -<div class="tags"> - - -</div> - </dt> - <dd><pre class="code"><span class='string val'>'(?<\1>.+?)'</span> -</pre></dd> - - </dl> - - - - - - - - - - <h2> - Instance Method Summary - <small>(<a href="#" class="summary_toggle">collapse</a>)</small> - </h2> - - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#call-instance_method" title="#call (instance method)">- (Object) <strong>call</strong>(env) </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'></div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#initialize-instance_method" title="#initialize (instance method)">- (Router) <strong>initialize</strong>(routes) </a> - - - - </span> - - - <span class="note title constructor">constructor</span> - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>A new instance of Router.</p> -</div></span> - -</li> - - - </ul> - - -<div id="constructor_details" class="method_details_list"> - <h2>Constructor Details</h2> - - <div class="method_details first"> - <h3 class="signature first" id="initialize-instance_method"> - - - (<tt><span class='object_link'><a href="" title="Zero::Router (class)">Router</a></span></tt>) <strong>initialize</strong>(routes) - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>A new instance of Router</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -8 -9 -10 -11 -12 -13 -14 -15</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/router.rb', line 8</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_routes identifier id'>routes</span><span class='rparen token'>)</span> - <span class='rubyid_@routes ivar id'>@routes</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span> - <span class='rubyid_routes identifier id'>routes</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_route identifier id'>route</span><span class='comma token'>,</span> <span class='rubyid_target identifier id'>target</span><span class='bitor op'>|</span> - <span class='rubyid_@routes ivar id'>@routes</span><span class='lbrack token'>[</span> - <span class='rubyid_Regexp constant id'>Regexp</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span> - <span class='rubyid_route identifier id'>route</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='rubyid_VARIABLE_MATCH constant id'>VARIABLE_MATCH</span><span class='comma token'>,</span> <span class='rubyid_VARIABLE_REGEX constant id'>VARIABLE_REGEX</span><span class='rparen token'>)</span> <span class='plus op'>+</span> <span class='string val'>'$'</span><span class='rparen token'>)</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_target identifier id'>target</span> - <span class='rubyid_end end kw'>end</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - -</div> - - - <div id="instance_method_details" class="method_details_list"> - <h2>Instance Method Details</h2> - - - <div class="method_details first"> - <h3 class="signature first" id="call-instance_method"> - - - (<tt>Object</tt>) <strong>call</strong>(env) - - - - - -</h3><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/zero/router.rb', line 17</span> - -<span class='rubyid_def def kw'>def</span> <span class='rubyid_call identifier id'>call</span><span class='lparen token'>(</span><span class='rubyid_env identifier id'>env</span><span class='rparen token'>)</span> - <span class='rubyid_request identifier id'>request</span> <span class='assign token'>=</span> <span class='rubyid_Zero constant id'>Zero</span><span class='colon2 op'>::</span><span class='rubyid_Request constant id'>Request</span><span class='dot token'>.</span><span class='rubyid_create identifier id'>create</span><span class='lparen token'>(</span><span class='rubyid_env identifier id'>env</span><span class='rparen token'>)</span> - <span class='rubyid_@routes ivar id'>@routes</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_route identifier id'>route</span><span class='comma token'>,</span> <span class='rubyid_target identifier id'>target</span><span class='bitor op'>|</span> - <span class='rubyid_match identifier id'>match</span> <span class='assign token'>=</span> <span class='rubyid_route identifier id'>route</span><span class='dot token'>.</span><span class='rubyid_match identifier id'>match</span><span class='lparen token'>(</span><span class='rubyid_request identifier id'>request</span><span class='dot token'>.</span><span class='rubyid_path identifier id'>path</span><span class='rparen token'>)</span> - <span class='rubyid_if if kw'>if</span> <span class='rubyid_match identifier id'>match</span> - <span class='rubyid_match identifier id'>match</span><span class='dot token'>.</span><span class='rubyid_names identifier id'>names</span><span class='dot token'>.</span><span class='rubyid_each_index identifier id'>each_index</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_i identifier id'>i</span><span class='bitor op'>|</span> - <span class='rubyid_request identifier id'>request</span><span class='dot token'>.</span><span class='rubyid_update_param identifier id'>update_param</span><span class='lparen token'>(</span><span class='rubyid_match identifier id'>match</span><span class='dot token'>.</span><span class='rubyid_names identifier id'>names</span><span class='lbrack token'>[</span><span class='rubyid_i identifier id'>i</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='rubyid_match identifier id'>match</span><span class='dot token'>.</span><span class='rubyid_captures identifier id'>captures</span><span class='lbrack token'>[</span><span class='rubyid_i identifier id'>i</span><span class='rbrack token'>]</span><span class='rparen token'>)</span> - <span class='rubyid_end end kw'>end</span> - <span class='rubyid_return return kw'>return</span> <span class='rubyid_target identifier id'>target</span><span class='dot token'>.</span><span class='rubyid_call identifier id'>call</span><span class='lparen token'>(</span><span class='rubyid_request identifier id'>request</span><span class='dot token'>.</span><span class='rubyid_env identifier id'>env</span><span class='rparen token'>)</span> - <span class='rubyid_end end kw'>end</span> - <span class='rubyid_end end kw'>end</span> - <span class='lbrack token'>[</span><span class='integer val'>404</span><span class='comma token'>,</span> <span class='lbrace token'>{</span><span class='string val'>'Content-Type'</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>'text/html'</span><span class='rbrace token'>}</span><span class='comma token'>,</span> <span class='lbrack token'>[</span><span class='string val'>'Not found!'</span><span class='rbrack token'>]</span><span class='rbrack token'>]</span> -<span class='rubyid_end end kw'>end</span> -</pre> - </td> - </tr> -</table> -</div> - - </div> - -</div> - - <div id="footer"> - Generated on Mon Nov 26 21:40:00 2012 by - <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.8.3 (ruby-1.9.3). -</div> - - </body> -</html>
\ No newline at end of file |