docs/code/Utopia/Controller/Variables.html in utopia-2.5.5 vs docs/code/Utopia/Controller/Variables.html in utopia-2.6.0

- old
+ new

@@ -1,336 +1,336 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> -<meta name="viewport" content="width=device-width, initial-scale=1.0"> -<title> - Class: Utopia::Controller::Variables - - &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::Controller::Variables"; - 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 (V)</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="../Controller.html" title="Utopia::Controller (class)">Controller</a></span></span> - &raquo; - <span class="title">Variables</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::Controller::Variables - - - -</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::Controller::Variables</li> - - </ul> - <a href="#" class="inheritanceTree">show all</a> - - </dd> - </dl> - - - - - - - - - - - - <dl> - <dt>Defined in:</dt> - <dd>lib/utopia/controller/variables.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::Controller::Variables + + &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::Controller::Variables"; + 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 (V)</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="../Controller.html" title="Utopia::Controller (class)">Controller</a></span></span> + &raquo; + <span class="title">Variables</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::Controller::Variables + + + +</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::Controller::Variables</li> + + </ul> + <a href="#" class="inheritanceTree">show all</a> + + </dd> + </dl> + + + + + + + + + + + + <dl> + <dt>Defined in:</dt> + <dd>lib/utopia/controller/variables.rb</dd> + </dl> + +</div> + +<h2>Overview</h2><div class="docstring"> + <div class="discussion"> <p>Provides a stack-based instance variable lookup mechanism. It can flatten a stack of controllers into a single hash.</p> - - - </div> -</div> -<div class="tags"> - - -</div> - - - - - - - - <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="#<<-instance_method" title="#&lt;&lt; (instance method)">#<strong>&lt;&lt;</strong>(controller) &#x21d2; Object </a> - - - - </span> - - - - - - - - - + + + </div> +</div> +<div class="tags"> + + +</div> + + + + + + + + <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="#<<-instance_method" title="#&lt;&lt; (instance method)">#<strong>&lt;&lt;</strong>(controller) &#x21d2; Object </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#[]-instance_method" title="#[] (instance method)">#<strong>[]</strong>(key) &#x21d2; Object </a> - - - - </span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#[]-instance_method" title="#[] (instance method)">#<strong>[]</strong>(key) &#x21d2; Object </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#fetch-instance_method" title="#fetch (instance method)">#<strong>fetch</strong>(key, default = self) &#x21d2; Object </a> - - - - </span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#fetch-instance_method" title="#fetch (instance method)">#<strong>fetch</strong>(key, default = self) &#x21d2; Object </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'><p>We use self as a seninel.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> &#x21d2; Variables </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> &#x21d2; Variables </a> + + + + </span> + + + <span class="note title constructor">constructor</span> + + + + + + + + <span class="summary_desc"><div class='inline'><p>A new instance of Variables.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#to_hash-instance_method" title="#to_hash (instance method)">#<strong>to_hash</strong> &#x21d2; Object </a> - - - - </span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#to_hash-instance_method" title="#to_hash (instance method)">#<strong>to_hash</strong> &#x21d2; Object </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#top-instance_method" title="#top (instance method)">#<strong>top</strong> &#x21d2; Object </a> - - - - </span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#top-instance_method" title="#top (instance method)">#<strong>top</strong> &#x21d2; Object </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'> -</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> &#x21d2; <tt><span class='object_link'><a href="" title="Utopia::Controller::Variables (class)">Variables</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> &#x21d2; <tt><span class='object_link'><a href="" title="Utopia::Controller::Variables (class)">Variables</a></span></tt> + + + + + +</h3><div class="docstring"> + <div class="discussion"> <p>Returns a new instance of Variables</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"> 25 26 -27</pre> - </td> - <td> +27</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/controller/variables.rb', line 25</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='ivar'>@controllers</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</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="<<-instance_method"> - - #<strong>&lt;&lt;</strong>(controller) &#x21d2; <tt>Object</tt> - - - - - -</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="<<-instance_method"> + + #<strong>&lt;&lt;</strong>(controller) &#x21d2; <tt>Object</tt> + + + + + +</h3><table class="source_code"> + <tr> + <td> <pre class="lines"> 33 34 @@ -339,13 +339,13 @@ 37 38 39 40 41 -42</pre> - </td> - <td> +42</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/controller/variables.rb', line 33</span> <span class='kw'>def</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_controller'>controller</span> <span class='kw'>if</span> <span class='id identifier rubyid_top'>top</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_top'>top</span> <span class='comment'># This ensures that most variables will be at the top and controllers can naturally interactive with instance variables: @@ -353,68 +353,68 @@ <span class='kw'>end</span> <span class='ivar'>@controllers</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_controller'>controller</span> <span class='kw'>return</span> <span class='kw'>self</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="[]-instance_method"> - - #<strong>[]</strong>(key) &#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="[]-instance_method"> + + #<strong>[]</strong>(key) &#x21d2; <tt>Object</tt> + + + + + +</h3><table class="source_code"> + <tr> + <td> <pre class="lines"> 75 76 -77</pre> - </td> - <td> +77</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/controller/variables.rb', line 75</span> <span class='kw'>def</span> <span class='op'>[]</span> <span class='id identifier rubyid_key'>key</span> <span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>@</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="fetch-instance_method"> - - #<strong>fetch</strong>(key, default = self) &#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="fetch-instance_method"> + + #<strong>fetch</strong>(key, default = self) &#x21d2; <tt>Object</tt> + + + + + +</h3><div class="docstring"> + <div class="discussion"> <p>We use self as a seninel</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"> 45 46 @@ -428,13 +428,13 @@ 54 55 56 57 58 -59</pre> - </td> - <td> +59</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/controller/variables.rb', line 45</span> <span class='kw'>def</span> <span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_default'>default</span><span class='op'>=</span><span class='kw'>self</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_controller'>controller</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_top'>top</span> <span class='kw'>if</span> <span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_instance_variables'>instance_variables</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> @@ -447,28 +447,28 @@ <span class='kw'>elsif</span> <span class='op'>!</span><span class='id identifier rubyid_default'>default</span><span class='period'>.</span><span class='id identifier rubyid_equal?'>equal?</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span> <span class='kw'>return</span> <span class='id identifier rubyid_default'>default</span> <span class='kw'>else</span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>KeyError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> <span class='kw'>end</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="to_hash-instance_method"> - - #<strong>to_hash</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="to_hash-instance_method"> + + #<strong>to_hash</strong> &#x21d2; <tt>Object</tt> + + + + + +</h3><table class="source_code"> + <tr> + <td> <pre class="lines"> 61 62 @@ -480,13 +480,13 @@ 68 69 70 71 72 -73</pre> - </td> - <td> +73</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/controller/variables.rb', line 61</span> <span class='kw'>def</span> <span class='id identifier rubyid_to_hash'>to_hash</span> <span class='id identifier rubyid_attributes'>attributes</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> @@ -497,54 +497,54 @@ <span class='id identifier rubyid_attributes'>attributes</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_instance_variable_get'>instance_variable_get</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> <span class='kw'>end</span> <span class='kw'>end</span> <span class='kw'>return</span> <span class='id identifier rubyid_attributes'>attributes</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="top-instance_method"> - - #<strong>top</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="top-instance_method"> + + #<strong>top</strong> &#x21d2; <tt>Object</tt> + + + + + +</h3><table class="source_code"> + <tr> + <td> <pre class="lines"> 29 30 -31</pre> - </td> - <td> +31</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/controller/variables.rb', line 29</span> <span class='kw'>def</span> <span class='id identifier rubyid_top'>top</span> <span class='ivar'>@controllers</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - </div> - -</div> - - <div id="footer"> - Generated on Sat Mar 24 21:17:22 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:55 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