diff options
Diffstat (limited to 'docs/FelFlame/ComponentManager.html')
| -rw-r--r-- | docs/FelFlame/ComponentManager.html | 170 |
1 files changed, 129 insertions, 41 deletions
diff --git a/docs/FelFlame/ComponentManager.html b/docs/FelFlame/ComponentManager.html index 7e92b7b..599b547 100644 --- a/docs/FelFlame/ComponentManager.html +++ b/docs/FelFlame/ComponentManager.html @@ -360,7 +360,7 @@ <li class="public "> <span class="summary_signature"> - <a href="#entities-instance_method" title="#entities (instance method)">#<strong>entities</strong> ⇒ Array<Integer> </a> + <a href="#entities-instance_method" title="#entities (instance method)">#<strong>entities</strong> ⇒ Array<Component> </a> @@ -384,6 +384,30 @@ <li class="public "> <span class="summary_signature"> + <a href="#entity-instance_method" title="#entity (instance method)">#<strong>entity</strong> ⇒ Component </a> + + + + </span> + + + + + + + + + + <span class="summary_desc"><div class='inline'> +<p>A single entity.</p> +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(**attrs) ⇒ Component </a> @@ -941,18 +965,18 @@ <pre class="lines"> -202 -203 -204 -205 -206 -207 -208 -209 -210</pre> +213 +214 +215 +216 +217 +218 +219 +220 +221</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 202</span> + <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 213</span> <span class='kw'>def</span> <span class='id identifier rubyid_attr_changed_trigger_systems'>attr_changed_trigger_systems</span><span class='lparen'>(</span><span class='id identifier rubyid_attr'>attr</span><span class='rparen'>)</span> <span class='id identifier rubyid_systems_to_execute'>systems_to_execute</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span> @@ -1012,22 +1036,22 @@ <pre class="lines"> -213 -214 -215 -216 -217 -218 -219 -220 -221 -222 -223 224 -225</pre> +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 213</span> + <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 224</span> <span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span> <span class='id identifier rubyid_addition_triggers'>addition_triggers</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_system'>system</span><span class='op'>|</span> @@ -1050,7 +1074,7 @@ <div class="method_details "> <h3 class="signature " id="entities-instance_method"> - #<strong>entities</strong> ⇒ <tt>Array<Integer></tt> + #<strong>entities</strong> ⇒ <tt>Array<Component></tt> @@ -1072,7 +1096,7 @@ <li> - <span class='type'>(<tt>Array<Integer></tt>)</span> + <span class='type'>(<tt>Array<Component></tt>)</span> @@ -1102,6 +1126,70 @@ </div> <div class="method_details "> + <h3 class="signature " id="entity-instance_method"> + + #<strong>entity</strong> ⇒ <tt>Component</tt> + + + + + +</h3><div class="docstring"> + <div class="discussion"> + +<p>A single entity. Use this if you expect the component to only belong to one entity and you want to access it.</p> + + + </div> +</div> +<div class="tags"> + +<p class="tag_title">Returns:</p> +<ul class="return"> + + <li> + + + <span class='type'>(<tt>Component</tt>)</span> + + + + </li> + +</ul> + +</div><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +194 +195 +196 +197 +198 +199 +200 +201</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 194</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_entity'>entity</span> + <span class='kw'>if</span> <span class='id identifier rubyid_entities'>entities</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> + <span class='const'>Warning</span><span class='period'>.</span><span class='id identifier rubyid_warn'>warn</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>This component belongs to NO entities but you called the method that is intended for components belonging to a single entity.\nYou may have a bug in your logic.</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> + <span class='kw'>elsif</span> <span class='id identifier rubyid_entities'>entities</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>></span> <span class='int'>1</span> + <span class='const'>Warning</span><span class='period'>.</span><span class='id identifier rubyid_warn'>warn</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>This component belongs to MANY entities but you called the method that is intended for components belonging to a single entity.\nYou may have a bug in your logic.</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> + <span class='kw'>end</span> + <span class='id identifier rubyid_entities'>entities</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> <h3 class="signature " id="to_h-instance_method"> #<strong>to_h</strong> ⇒ <tt>Hash<Symbol, Value></tt> @@ -1145,16 +1233,16 @@ <pre class="lines"> -228 -229 -230 -231 -232 -233 -234</pre> +239 +240 +241 +242 +243 +244 +245</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 228</span> + <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 239</span> <span class='kw'>def</span> <span class='id identifier rubyid_to_h'>to_h</span> <span class='id identifier rubyid_return_hash'>return_hash</span> <span class='op'>=</span> <span class='id identifier rubyid_instance_variables'>instance_variables</span><span class='period'>.</span><span class='id identifier rubyid_each_with_object'>each_with_object</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_final'>final</span><span class='op'>|</span> @@ -1212,14 +1300,14 @@ <pre class="lines"> -194 -195 -196 -197 -198</pre> +205 +206 +207 +208 +209</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 194</span> + <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 205</span> <span class='kw'>def</span> <span class='id identifier rubyid_update_attrs'>update_attrs</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span> <span class='id identifier rubyid_opts'>opts</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_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span> @@ -1236,7 +1324,7 @@ </div> <div id="footer"> - Generated on Thu Dec 30 04:25:43 2021 by + Generated on Thu Dec 30 07:28:06 2021 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.26 (ruby-2.7.3). </div> |
