doc/TermUtils/AP/Result.html in term_utils-0.3.0 vs doc/TermUtils/AP/Result.html in term_utils-0.3.1

- old
+ new

@@ -156,10 +156,34 @@ <ul class="summary"> <li class="public "> <span class="summary_signature"> + <a href="#collect-instance_method" title="#collect (instance method)">#<strong>collect</strong>(id, &amp;block) &#x21d2; Array&lt;Symbol&gt; </a> + + + + </span> + + + + + + + + + + <span class="summary_desc"><div class='inline'> +<p>Collects IDs.</p> +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + <a href="#eval_occurs-instance_method" title="#eval_occurs (instance method)">#<strong>eval_occurs</strong>(id) &#x21d2; Integer </a> </span> @@ -459,12 +483,118 @@ <div id="instance_method_details" class="method_details_list"> <h2>Instance Method Details</h2> <div class="method_details first"> - <h3 class="signature first" id="eval_occurs-instance_method"> + <h3 class="signature first" id="collect-instance_method"> + #<strong>collect</strong>(id, &amp;block) &#x21d2; <tt>Array&lt;Symbol&gt;</tt> + + + + + +</h3><div class="docstring"> + <div class="discussion"> + +<p>Collects IDs.</p> + + + </div> +</div> +<div class="tags"> + <p class="tag_title">Parameters:</p> +<ul class="param"> + + <li> + + <span class='name'>id</span> + + + <span class='type'>(<tt>Symbol</tt>, <tt>Array&lt;Symbol&gt;</tt>)</span> + + + + &mdash; + <div class='inline'> +<p>ID path.</p> +</div> + + </li> + +</ul> + +<p class="tag_title">Returns:</p> +<ul class="return"> + + <li> + + + <span class='type'>(<tt>Array&lt;Symbol&gt;</tt>)</span> + + + + </li> + +</ul> + +</div><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/term_utils/ap/result.rb', line 41</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_collect'>collect</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span> + <span class='id identifier rubyid_node'>node</span> <span class='op'>=</span> <span class='ivar'>@value</span> + <span class='kw'>if</span> <span class='id identifier rubyid_id'>id</span> + <span class='id identifier rubyid_id'>id</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_id'>id</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Symbol</span> + <span class='id identifier rubyid_node'>node</span> <span class='op'>=</span> <span class='ivar'>@value</span><span class='period'>.</span><span class='id identifier rubyid_find_node'>find_node</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span> + <span class='kw'>end</span> + <span class='id identifier rubyid_res'>res</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> + <span class='kw'>return</span> <span class='id identifier rubyid_res'>res</span> <span class='kw'>unless</span> <span class='id identifier rubyid_node'>node</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_child_nodes'>child_nodes</span> + <span class='kw'>if</span> <span class='id identifier rubyid_block'>block</span> + <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_child_nodes'>child_nodes</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_n'>n</span><span class='op'>|</span> + <span class='id identifier rubyid_res'>res</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_n'>n</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span> <span class='kw'>if</span> <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_n'>n</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> + <span class='kw'>end</span> + <span class='kw'>else</span> + <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_child_nodes'>child_nodes</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_n'>n</span><span class='op'>|</span> + <span class='id identifier rubyid_res'>res</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_n'>n</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span> + <span class='kw'>end</span> + <span class='kw'>end</span> + <span class='id identifier rubyid_res'>res</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="eval_occurs-instance_method"> + #<strong>eval_occurs</strong>(id) &#x21d2; <tt>Integer</tt> @@ -525,23 +655,23 @@ <tr> <td> <pre class="lines"> -51 -52 -53 -54 -55 -56 -57 -58 -59 -60</pre> +73 +74 +75 +76 +77 +78 +79 +80 +81 +82</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/term_utils/ap/result.rb', line 51</span> + <pre class="code"><span class="info file"># File 'lib/term_utils/ap/result.rb', line 73</span> <span class='kw'>def</span> <span class='id identifier rubyid_eval_occurs'>eval_occurs</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span> <span class='id identifier rubyid_id'>id</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_id'>id</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Symbol</span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_fetch_syntax_object'>fetch_syntax_object</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../TermUtils.html" title="TermUtils (module)">TermUtils</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../AP.html" title="TermUtils::AP (module)">AP</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="NoSuchValueError.html" title="TermUtils::AP::NoSuchValueError (class)">NoSuchValueError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>no such syntax object</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_obj'>obj</span> @@ -676,32 +806,10 @@ <tr> <td> <pre class="lines"> -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 90 91 92 93 94 @@ -720,14 +828,36 @@ 107 108 109 110 111 -112</pre> +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/term_utils/ap/result.rb', line 68</span> + <pre class="code"><span class="info file"># File 'lib/term_utils/ap/result.rb', line 90</span> <span class='kw'>def</span> <span class='id identifier rubyid_fetch_value'>fetch_value</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='id identifier rubyid_index'>index</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:index</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='id identifier rubyid_multi'>multi</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:multi</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_id'>id</span> @@ -805,10 +935,15 @@ <span class='type'>(<tt>Symbol</tt>, <tt>Array&lt;Symbol&gt;</tt>)</span> + &mdash; + <div class='inline'> +<p>ID path.</p> +</div> + </li> </ul> <p class="tag_title">Returns:</p> @@ -829,20 +964,20 @@ <tr> <td> <pre class="lines"> -41 -42 -43 -44 -45 -46 -47</pre> +63 +64 +65 +66 +67 +68 +69</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/term_utils/ap/result.rb', line 41</span> + <pre class="code"><span class="info file"># File 'lib/term_utils/ap/result.rb', line 63</span> <span class='kw'>def</span> <span class='id identifier rubyid_present?'>present?</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_id'>id</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Symbol</span> <span class='op'>!</span><span class='op'>!</span><span class='ivar'>@value</span><span class='period'>.</span><span class='id identifier rubyid_child_node'>child_node</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span> <span class='kw'>elsif</span> <span class='id identifier rubyid_id'>id</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Array</span> @@ -961,34 +1096,34 @@ <tr> <td> <pre class="lines"> -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139</pre> +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/term_utils/ap/result.rb', line 119</span> + <pre class="code"><span class="info file"># File 'lib/term_utils/ap/result.rb', line 141</span> <span class='kw'>def</span> <span class='id identifier rubyid_shift'>shift</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='id identifier rubyid_index'>index</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:index</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='id identifier rubyid_id'>id</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_id'>id</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Symbol</span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_fetch_syntax_object'>fetch_syntax_object</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span> @@ -1017,10 +1152,10 @@ </div> </div> <div id="footer"> - Generated on Sun Nov 10 18:36:19 2019 by + Generated on Sat Nov 16 17:06:17 2019 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.20 (ruby-2.6.5). </div> </div> \ No newline at end of file