docs/code/Utopia/Static/LocalFile.html in utopia-2.5.5 vs docs/code/Utopia/Static/LocalFile.html in utopia-2.6.0

- old
+ new

@@ -1,754 +1,760 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> -<meta name="viewport" content="width=device-width, initial-scale=1.0"> -<title> - Class: Utopia::Static::LocalFile - - &mdash; Documentation by YARD 0.9.12 - -</title> - - <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" /> - - <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" /> - -<script type="text/javascript" charset="utf-8"> - pathId = "Utopia::Static::LocalFile"; - relpath = '../../'; -</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 class="nav_wrap"> - <iframe id="nav" src="../../class_list.html?1"></iframe> - <div id="resizer"></div> - </div> - - <div id="main" tabindex="-1"> - <div id="header"> - <div id="menu"> - - <a href="../../_index.html">Index (L)</a> &raquo; - <span class='title'><span class='object_link'><a href="../../Utopia.html" title="Utopia (module)">Utopia</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Static.html" title="Utopia::Static (class)">Static</a></span></span> - &raquo; - <span class="title">LocalFile</span> - -</div> - - <div id="search"> - - <a class="full_list_link" id="class_list_link" - href="../../class_list.html"> - - <svg width="24" height="24"> - <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect> - <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect> - <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect> - </svg> - </a> - -</div> - <div class="clear"></div> - </div> - - <div id="content"><h1>Class: Utopia::Static::LocalFile - - - -</h1> -<div class="box_info"> - - <dl> - <dt>Inherits:</dt> - <dd> - <span class="inheritName">Object</span> - - <ul class="fullTree"> - <li>Object</li> - - <li class="next">Utopia::Static::LocalFile</li> - - </ul> - <a href="#" class="inheritanceTree">show all</a> - - </dd> - </dl> - - - - - - - - - - - - <dl> - <dt>Defined in:</dt> - <dd>lib/utopia/static/local_file.rb</dd> - </dl> - -</div> - -<h2>Overview</h2><div class="docstring"> - <div class="discussion"> +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> +<title> + Class: Utopia::Static::LocalFile + + &mdash; Documentation by YARD 0.9.18 + +</title> + + <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" /> + + <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" /> + +<script type="text/javascript" charset="utf-8"> + pathId = "Utopia::Static::LocalFile"; + relpath = '../../'; +</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 class="nav_wrap"> + <iframe id="nav" src="../../class_list.html?1"></iframe> + <div id="resizer"></div> + </div> + + <div id="main" tabindex="-1"> + <div id="header"> + <div id="menu"> + + <a href="../../_index.html">Index (L)</a> &raquo; + <span class='title'><span class='object_link'><a href="../../Utopia.html" title="Utopia (module)">Utopia</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Static.html" title="Utopia::Static (class)">Static</a></span></span> + &raquo; + <span class="title">LocalFile</span> + +</div> + + <div id="search"> + + <a class="full_list_link" id="class_list_link" + href="../../class_list.html"> + + <svg width="24" height="24"> + <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect> + <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect> + <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect> + </svg> + </a> + +</div> + <div class="clear"></div> + </div> + + <div id="content"><h1>Class: Utopia::Static::LocalFile + + + +</h1> +<div class="box_info"> + + <dl> + <dt>Inherits:</dt> + <dd> + <span class="inheritName">Object</span> + + <ul class="fullTree"> + <li>Object</li> + + <li class="next">Utopia::Static::LocalFile</li> + + </ul> + <a href="#" class="inheritanceTree">show all</a> + + </dd> + </dl> + + + + + + + + + + + + <dl> + <dt>Defined in:</dt> + <dd>lib/utopia/static/local_file.rb</dd> + </dl> + +</div> + +<h2>Overview</h2><div class="docstring"> + <div class="discussion"> <p>Represents a local file on disk which can be served directly, or passed upstream to sendfile.</p> - - - </div> -</div> -<div class="tags"> - - -</div> - <h2>Constant Summary</h2> - <dl class="constants"> - - <dt id="CONTENT_LENGTH-constant" class="">CONTENT_LENGTH = - - </dt> - <dd><pre class="code"><span class='const'>Rack</span><span class='op'>::</span><span class='const'>CONTENT_LENGTH</span></pre></dd> - - <dt id="CONTENT_RANGE-constant" class="">CONTENT_RANGE = - - </dt> - <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Content-Range</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</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="#etag-instance_method" title="#etag (instance method)">#<strong>etag</strong> &#x21d2; Object </a> - - - - </span> - - - - - <span class="note title readonly">readonly</span> - - - - - - - - - + + + </div> +</div> +<div class="tags"> + + +</div> + + <h2> + Constant Summary + <small><a href="#" class="constants_summary_toggle">collapse</a></small> + </h2> + + <dl class="constants"> + + <dt id="CONTENT_LENGTH-constant" class="">CONTENT_LENGTH = + + </dt> + <dd><pre class="code"><span class='const'>Rack</span><span class='op'>::</span><span class='const'>CONTENT_LENGTH</span></pre></dd> + + <dt id="CONTENT_RANGE-constant" class="">CONTENT_RANGE = + + </dt> + <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Content-Range</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</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="#etag-instance_method" title="#etag (instance method)">#<strong>etag</strong> &#x21d2; Object </a> + + + + </span> + + + + + <span class="note title readonly">readonly</span> + + + + + + + + + <span class="summary_desc"><div class='inline'><p>Returns the value of attribute etag.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#path-instance_method" title="#path (instance method)">#<strong>path</strong> &#x21d2; Object </a> - - - - </span> - - - - - <span class="note title readonly">readonly</span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#path-instance_method" title="#path (instance method)">#<strong>path</strong> &#x21d2; Object </a> + + + + </span> + + + + + <span class="note title readonly">readonly</span> + + + + + + + + + <span class="summary_desc"><div class='inline'><p>Returns the value of attribute path.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#range-instance_method" title="#range (instance method)">#<strong>range</strong> &#x21d2; Object </a> - - - - </span> - - - - - <span class="note title readonly">readonly</span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#range-instance_method" title="#range (instance method)">#<strong>range</strong> &#x21d2; Object </a> + + + + </span> + + + + + <span class="note title readonly">readonly</span> + + + + + + + + + <span class="summary_desc"><div class='inline'><p>Returns the value of attribute range.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#root-instance_method" title="#root (instance method)">#<strong>root</strong> &#x21d2; Object </a> - - - - </span> - - - - - <span class="note title readonly">readonly</span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#root-instance_method" title="#root (instance method)">#<strong>root</strong> &#x21d2; Object </a> + + + + </span> + + + + + <span class="note title readonly">readonly</span> + + + + + + + + + <span class="summary_desc"><div class='inline'><p>Returns the value of attribute root.</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="#bytesize-instance_method" title="#bytesize (instance method)">#<strong>bytesize</strong> &#x21d2; Object </a> - - - - (also: #size) - - </span> - - - - - - - - - +</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="#bytesize-instance_method" title="#bytesize (instance method)">#<strong>bytesize</strong> &#x21d2; Object </a> + + + + (also: #size) + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#each-instance_method" title="#each (instance method)">#<strong>each</strong> &#x21d2; Object </a> - - - - </span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#each-instance_method" title="#each (instance method)">#<strong>each</strong> &#x21d2; Object </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#empty%3F-instance_method" title="#empty? (instance method)">#<strong>empty?</strong> &#x21d2; Boolean </a> - - - - </span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#empty%3F-instance_method" title="#empty? (instance method)">#<strong>empty?</strong> &#x21d2; Boolean </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'><p>This reflects whether calling each would yield anything.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#full_path-instance_method" title="#full_path (instance method)">#<strong>full_path</strong> &#x21d2; Object </a> - - - - </span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#full_path-instance_method" title="#full_path (instance method)">#<strong>full_path</strong> &#x21d2; Object </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)">#<strong>initialize</strong>(root, path) &#x21d2; LocalFile </a> - - - - </span> - - - <span class="note title constructor">constructor</span> - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(root, path) &#x21d2; LocalFile </a> + + + + </span> + + + <span class="note title constructor">constructor</span> + + + + + + + + <span class="summary_desc"><div class='inline'><p>A new instance of LocalFile.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#modified%3F-instance_method" title="#modified? (instance method)">#<strong>modified?</strong>(env) &#x21d2; Boolean </a> - - - - </span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#modified%3F-instance_method" title="#modified? (instance method)">#<strong>modified?</strong>(env) &#x21d2; Boolean </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#mtime_date-instance_method" title="#mtime_date (instance method)">#<strong>mtime_date</strong> &#x21d2; Object </a> - - - - </span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#mtime_date-instance_method" title="#mtime_date (instance method)">#<strong>mtime_date</strong> &#x21d2; Object </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#serve-instance_method" title="#serve (instance method)">#<strong>serve</strong>(env, response_headers) &#x21d2; Object </a> - - - - </span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#serve-instance_method" title="#serve (instance method)">#<strong>serve</strong>(env, response_headers) &#x21d2; Object </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#to_path-instance_method" title="#to_path (instance method)">#<strong>to_path</strong> &#x21d2; Object </a> - - - - </span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#to_path-instance_method" title="#to_path (instance method)">#<strong>to_path</strong> &#x21d2; Object </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'><p>Fit in with Rack::Sendfile.</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"> - - #<strong>initialize</strong>(root, path) &#x21d2; <tt><span class='object_link'><a href="" title="Utopia::Static::LocalFile (class)">LocalFile</a></span></tt> - - - - - -</h3><div class="docstring"> - <div class="discussion"> +</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"> + + #<strong>initialize</strong>(root, path) &#x21d2; <tt><span class='object_link'><a href="" title="Utopia::Static::LocalFile (class)">LocalFile</a></span></tt> + + + + + +</h3><div class="docstring"> + <div class="discussion"> <p>Returns a new instance of LocalFile</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> + <tr> + <td> <pre class="lines"> 29 30 31 32 33 34 -35</pre> - </td> - <td> +35</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/static/local_file.rb', line 29</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_root'><span class='object_link'><a href="../../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='ivar'>@root</span> <span class='op'>=</span> <span class='id identifier rubyid_root'><span class='object_link'><a href="../../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></span> <span class='ivar'>@path</span> <span class='op'>=</span> <span class='id identifier rubyid_path'>path</span> <span class='ivar'>@etag</span> <span class='op'>=</span> <span class='const'>Digest</span><span class='op'>::</span><span class='const'>SHA1</span><span class='period'>.</span><span class='id identifier rubyid_hexdigest'>hexdigest</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='lparen'>(</span><span class='id identifier rubyid_full_path'>full_path</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_mtime_date'>mtime_date</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='ivar'>@range</span> <span class='op'>=</span> <span class='kw'>nil</span> -<span class='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="etag-instance_method"> - - #<strong>etag</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span> - - - - - -</h3><div class="docstring"> - <div class="discussion"> +<span class='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="etag-instance_method"> + + #<strong>etag</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span> + + + + + +</h3><div class="docstring"> + <div class="discussion"> <p>Returns the value of attribute etag</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> + <tr> + <td> <pre class="lines"> 39 40 -41</pre> - </td> - <td> +41</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/static/local_file.rb', line 39</span> <span class='kw'>def</span> <span class='id identifier rubyid_etag'>etag</span> <span class='ivar'>@etag</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - - <span id=""></span> - <div class="method_details "> - <h3 class="signature " id="path-instance_method"> - - #<strong>path</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span> - - - - - -</h3><div class="docstring"> - <div class="discussion"> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + + <span id=""></span> + <div class="method_details "> + <h3 class="signature " id="path-instance_method"> + + #<strong>path</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span> + + + + + +</h3><div class="docstring"> + <div class="discussion"> <p>Returns the value of attribute path</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> + <tr> + <td> <pre class="lines"> 38 39 -40</pre> - </td> - <td> +40</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/static/local_file.rb', line 38</span> <span class='kw'>def</span> <span class='id identifier rubyid_path'>path</span> <span class='ivar'>@path</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - - <span id=""></span> - <div class="method_details "> - <h3 class="signature " id="range-instance_method"> - - #<strong>range</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span> - - - - - -</h3><div class="docstring"> - <div class="discussion"> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + + <span id=""></span> + <div class="method_details "> + <h3 class="signature " id="range-instance_method"> + + #<strong>range</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span> + + + + + +</h3><div class="docstring"> + <div class="discussion"> <p>Returns the value of attribute range</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> + <tr> + <td> <pre class="lines"> 40 41 -42</pre> - </td> - <td> +42</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/static/local_file.rb', line 40</span> <span class='kw'>def</span> <span class='id identifier rubyid_range'>range</span> <span class='ivar'>@range</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - - <span id=""></span> - <div class="method_details "> - <h3 class="signature " id="root-instance_method"> - - #<strong>root</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span> - - - - - -</h3><div class="docstring"> - <div class="discussion"> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + + <span id=""></span> + <div class="method_details "> + <h3 class="signature " id="root-instance_method"> + + #<strong>root</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span> + + + + + +</h3><div class="docstring"> + <div class="discussion"> <p>Returns the value of attribute root</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> + <tr> + <td> <pre class="lines"> 37 38 -39</pre> - </td> - <td> +39</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/static/local_file.rb', line 37</span> <span class='kw'>def</span> <span class='id identifier rubyid_root'><span class='object_link'><a href="../../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></span> <span class='ivar'>@root</span> -<span class='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="bytesize-instance_method"> - - #<strong>bytesize</strong> &#x21d2; <tt>Object</tt> - - - - <span class="aliases">Also known as: - <span class="names"><span id='size-instance_method'>size</span></span> - </span> - - - -</h3><table class="source_code"> - <tr> - <td> +<span class='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="bytesize-instance_method"> + + #<strong>bytesize</strong> &#x21d2; <tt>Object</tt> + + + + <span class="aliases">Also known as: + <span class="names"><span id='size-instance_method'>size</span></span> + </span> + + + +</h3><table class="source_code"> + <tr> + <td> <pre class="lines"> 55 56 -57</pre> - </td> - <td> +57</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/static/local_file.rb', line 55</span> <span class='kw'>def</span> <span class='id identifier rubyid_bytesize'>bytesize</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='lparen'>(</span><span class='id identifier rubyid_full_path'>full_path</span><span class='rparen'>)</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="each-instance_method"> - - #<strong>each</strong> &#x21d2; <tt>Object</tt> - - - - - -</h3><table class="source_code"> - <tr> - <td> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="each-instance_method"> + + #<strong>each</strong> &#x21d2; <tt>Object</tt> + + + + + +</h3><table class="source_code"> + <tr> + <td> <pre class="lines"> 66 67 @@ -761,13 +767,13 @@ 74 75 76 77 78 -79</pre> - </td> - <td> +79</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/static/local_file.rb', line 66</span> <span class='kw'>def</span> <span class='id identifier rubyid_each'>each</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_full_path'>full_path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>rb</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_file'>file</span><span class='op'>|</span> <span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_seek'>seek</span><span class='lparen'>(</span><span class='ivar'>@range</span><span class='period'>.</span><span class='id identifier rubyid_begin'>begin</span><span class='rparen'>)</span> @@ -779,134 +785,134 @@ <span class='id identifier rubyid_remaining'>remaining</span> <span class='op'>-=</span> <span class='id identifier rubyid_part'>part</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='kw'>yield</span> <span class='id identifier rubyid_part'>part</span> <span class='kw'>end</span> <span class='kw'>end</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="empty?-instance_method"> - - #<strong>empty?</strong> &#x21d2; <tt>Boolean</tt> - - - - - -</h3><div class="docstring"> - <div class="discussion"> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="empty?-instance_method"> + + #<strong>empty?</strong> &#x21d2; <tt>Boolean</tt> + + + + + +</h3><div class="docstring"> + <div class="discussion"> <p>This reflects whether calling each would yield anything.</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>Boolean</tt>)</span> - - - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> + + + </div> +</div> +<div class="tags"> + +<p class="tag_title">Returns:</p> +<ul class="return"> + + <li> + + + <span class='type'>(<tt>Boolean</tt>)</span> + + + + </li> + +</ul> + +</div><table class="source_code"> + <tr> + <td> <pre class="lines"> 60 61 -62</pre> - </td> - <td> +62</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/static/local_file.rb', line 60</span> <span class='kw'>def</span> <span class='id identifier rubyid_empty?'>empty?</span> <span class='id identifier rubyid_bytesize'>bytesize</span> <span class='op'>==</span> <span class='int'>0</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="full_path-instance_method"> - - #<strong>full_path</strong> &#x21d2; <tt>Object</tt> - - - - - -</h3><table class="source_code"> - <tr> - <td> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="full_path-instance_method"> + + #<strong>full_path</strong> &#x21d2; <tt>Object</tt> + + + + + +</h3><table class="source_code"> + <tr> + <td> <pre class="lines"> 47 48 -49</pre> - </td> - <td> +49</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/static/local_file.rb', line 47</span> <span class='kw'>def</span> <span class='id identifier rubyid_full_path'>full_path</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='ivar'>@root</span><span class='comma'>,</span> <span class='ivar'>@path</span><span class='period'>.</span><span class='id identifier rubyid_components'>components</span><span class='rparen'>)</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="modified?-instance_method"> + + #<strong>modified?</strong>(env) &#x21d2; <tt>Boolean</tt> + + + + + +</h3><div class="docstring"> + <div class="discussion"> - <div class="method_details "> - <h3 class="signature " id="modified?-instance_method"> - - #<strong>modified?</strong>(env) &#x21d2; <tt>Boolean</tt> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>Boolean</tt>)</span> - - - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> + + + </div> +</div> +<div class="tags"> + +<p class="tag_title">Returns:</p> +<ul class="return"> + + <li> + + + <span class='type'>(<tt>Boolean</tt>)</span> + + + + </li> + +</ul> + +</div><table class="source_code"> + <tr> + <td> <pre class="lines"> 81 82 @@ -917,13 +923,13 @@ 87 88 89 90 91 -92</pre> - </td> - <td> +92</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/static/local_file.rb', line 81</span> <span class='kw'>def</span> <span class='id identifier rubyid_modified?'>modified?</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_modified_since'>modified_since</span> <span class='op'>=</span> <span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>HTTP_IF_MODIFIED_SINCE</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>if</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_mtime'>mtime</span><span class='lparen'>(</span><span class='id identifier rubyid_full_path'>full_path</span><span class='rparen'>)</span> <span class='op'>&lt;=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_modified_since'>modified_since</span><span class='rparen'>)</span> @@ -933,58 +939,58 @@ <span class='id identifier rubyid_etags'>etags</span> <span class='op'>=</span> <span class='id identifier rubyid_etags'>etags</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\s*,\s*</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span> <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>if</span> <span class='id identifier rubyid_etags'>etags</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_etag'>etag</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_etags'>etags</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>*</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='kw'>end</span> <span class='kw'>return</span> <span class='kw'>true</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="mtime_date-instance_method"> - - #<strong>mtime_date</strong> &#x21d2; <tt>Object</tt> - - - - - -</h3><table class="source_code"> - <tr> - <td> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="mtime_date-instance_method"> + + #<strong>mtime_date</strong> &#x21d2; <tt>Object</tt> + + + + + +</h3><table class="source_code"> + <tr> + <td> <pre class="lines"> 51 52 -53</pre> - </td> - <td> +53</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/static/local_file.rb', line 51</span> <span class='kw'>def</span> <span class='id identifier rubyid_mtime_date'>mtime_date</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_mtime'>mtime</span><span class='lparen'>(</span><span class='id identifier rubyid_full_path'>full_path</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_httpdate'>httpdate</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="serve-instance_method"> - - #<strong>serve</strong>(env, response_headers) &#x21d2; <tt>Object</tt> - - - - - -</h3><table class="source_code"> - <tr> - <td> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="serve-instance_method"> + + #<strong>serve</strong>(env, response_headers) &#x21d2; <tt>Object</tt> + + + + + +</h3><table class="source_code"> + <tr> + <td> <pre class="lines"> 97 98 @@ -1007,13 +1013,13 @@ 115 116 117 118 119 -120</pre> - </td> - <td> +120</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/static/local_file.rb', line 97</span> <span class='kw'>def</span> <span class='id identifier rubyid_serve'>serve</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='comma'>,</span> <span class='id identifier rubyid_response_headers'>response_headers</span><span class='rparen'>)</span> <span class='id identifier rubyid_ranges'>ranges</span> <span class='op'>=</span> <span class='const'>Rack</span><span class='op'>::</span><span class='const'>Utils</span><span class='period'>.</span><span class='id identifier rubyid_get_byte_ranges'>get_byte_ranges</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>HTTP_RANGE</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_size'>size</span><span class='rparen'>)</span> <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='int'>200</span><span class='comma'>,</span> <span class='id identifier rubyid_response_headers'>response_headers</span><span class='comma'>,</span> <span class='kw'>self</span><span class='rbracket'>]</span> @@ -1035,64 +1041,64 @@ <span class='id identifier rubyid_response'>response</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#CONTENT_LENGTH-constant" title="Utopia::Static::LocalFile::CONTENT_LENGTH (constant)">CONTENT_LENGTH</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_partial_size'>partial_size</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='id identifier rubyid_response'>response</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#CONTENT_RANGE-constant" title="Utopia::Static::LocalFile::CONTENT_RANGE (constant)">CONTENT_RANGE</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>bytes </span><span class='embexpr_beg'>#{</span><span class='ivar'>@range</span><span class='period'>.</span><span class='id identifier rubyid_min'>min</span><span class='embexpr_end'>}</span><span class='tstring_content'>-</span><span class='embexpr_beg'>#{</span><span class='ivar'>@range</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_size'>size</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>end</span> <span class='kw'>return</span> <span class='id identifier rubyid_response'>response</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="to_path-instance_method"> - - #<strong>to_path</strong> &#x21d2; <tt>Object</tt> - - - - - -</h3><div class="docstring"> - <div class="discussion"> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="to_path-instance_method"> + + #<strong>to_path</strong> &#x21d2; <tt>Object</tt> + + + + + +</h3><div class="docstring"> + <div class="discussion"> <p>Fit in with Rack::Sendfile</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> + <tr> + <td> <pre class="lines"> 43 44 -45</pre> - </td> - <td> +45</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/static/local_file.rb', line 43</span> <span class='kw'>def</span> <span class='id identifier rubyid_to_path'>to_path</span> <span class='id identifier rubyid_full_path'>full_path</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - </div> - -</div> - - <div id="footer"> - Generated on Sat Mar 24 21:17:21 2018 by - <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.9.12 (ruby-2.5.0). -</div> - - </div> - </body> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + </div> + +</div> + + <div id="footer"> + Generated on Sat Mar 9 12:01:54 2019 by + <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> + 0.9.18 (ruby-2.6.1). +</div> + + </div> + </body> </html> \ No newline at end of file