felecs 5.0.0 → 5.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,333 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Module: FelFlame::Components
8
-
9
- &mdash; Documentation by YARD 0.9.26
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
-
17
- <script type="text/javascript">
18
- pathId = "FelFlame::Components";
19
- relpath = '../';
20
- </script>
21
-
22
-
23
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
-
25
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="../class_list.html?1"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
-
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../_index.html">Index (C)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span>
41
- &raquo;
42
- <span class="title">Components</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="../class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
61
-
62
- <div id="content"><h1>Module: FelFlame::Components
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
- <dl>
80
- <dt>Defined in:</dt>
81
- <dd>lib/felflame.rb<span class="defines">,<br />
82
- lib/felflame/component_manager.rb</span>
83
- </dd>
84
- </dl>
85
-
86
- </div>
87
-
88
- <h2>Overview</h2><div class="docstring">
89
- <div class="discussion">
90
-
91
- <p>Creates component managers and allows accessing them them under the <span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span> namespace as Constants. You can use array methods directly on this class to access Component Managers.</p>
92
-
93
- <p>To see how component managers are used please look at the <span class='object_link'><a href="ComponentManager.html" title="FelFlame::ComponentManager (class)">ComponentManager</a></span> documentation.</p>
94
-
95
-
96
- </div>
97
- </div>
98
- <div class="tags">
99
-
100
-
101
- </div>
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
- <h2>
110
- Class Method Summary
111
- <small><a href="#" class="summary_toggle">collapse</a></small>
112
- </h2>
113
-
114
- <ul class="summary">
115
-
116
- <li class="public ">
117
- <span class="summary_signature">
118
-
119
- <a href="#new-class_method" title="new (class method)">.<strong>new</strong>(component_name, *attrs, **attrs_with_defaults) &#x21d2; ComponentManager </a>
120
-
121
-
122
-
123
- </span>
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
- <span class="summary_desc"><div class='inline'>
134
- <p>Creates a new <span class='object_link'><a href="ComponentManager.html" title="FelFlame::ComponentManager (class)">component manager</a></span>.</p>
135
- </div></span>
136
-
137
- </li>
138
-
139
-
140
- </ul>
141
-
142
-
143
-
144
-
145
- <div id="class_method_details" class="method_details_list">
146
- <h2>Class Method Details</h2>
147
-
148
-
149
- <div class="method_details first">
150
- <h3 class="signature first" id="new-class_method">
151
-
152
- .<strong>new</strong>(component_name, *attrs, **attrs_with_defaults) &#x21d2; <tt><span class='object_link'><a href="ComponentManager.html" title="FelFlame::ComponentManager (class)">ComponentManager</a></span></tt>
153
-
154
-
155
-
156
-
157
-
158
- </h3><div class="docstring">
159
- <div class="discussion">
160
-
161
- <p>Creates a new <span class='object_link'><a href="ComponentManager.html" title="FelFlame::ComponentManager (class)">component manager</a></span>.</p>
162
-
163
-
164
- </div>
165
- </div>
166
- <div class="tags">
167
-
168
- <div class="examples">
169
- <p class="tag_title">Examples:</p>
170
-
171
-
172
- <pre class="example code"><code><span class='comment'># Here color is set to default to red
173
- </span><span class='comment'># while max and current are nil until set.
174
- </span><span class='comment'># When you make a new component using this component manager
175
- </span><span class='comment'># these are the values and accessors it will have.
176
- </span><span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'>Component</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Health</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='symbol'>:max</span><span class='comma'>,</span> <span class='symbol'>:current</span><span class='comma'>,</span> <span class='label'>color:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>red</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span></code></pre>
177
-
178
- </div>
179
- <p class="tag_title">Parameters:</p>
180
- <ul class="param">
181
-
182
- <li>
183
-
184
- <span class='name'>component_name</span>
185
-
186
-
187
- <span class='type'>(<tt>String</tt>)</span>
188
-
189
-
190
-
191
- &mdash;
192
- <div class='inline'>
193
- <p>Name of your new component manager. Must be stylized in the format of constants in Ruby</p>
194
- </div>
195
-
196
- </li>
197
-
198
- <li>
199
-
200
- <span class='name'>attrs</span>
201
-
202
-
203
- <span class='type'>(<tt>:Symbols</tt>)</span>
204
-
205
-
206
-
207
- &mdash;
208
- <div class='inline'>
209
- <p>New components made with this manager will include these symbols as accessors, the values of these accessors will default to nil</p>
210
- </div>
211
-
212
- </li>
213
-
214
- <li>
215
-
216
- <span class='name'>attrs_with_defaults</span>
217
-
218
-
219
- <span class='type'>(<tt>Keyword: DefaultValue</tt>)</span>
220
-
221
-
222
-
223
- &mdash;
224
- <div class='inline'>
225
- <p>New components made with this manager will include these keywords as accessors, their defaults set to the values given to the keywords</p>
226
- </div>
227
-
228
- </li>
229
-
230
- </ul>
231
-
232
- <p class="tag_title">Returns:</p>
233
- <ul class="return">
234
-
235
- <li>
236
-
237
-
238
- <span class='type'>(<tt><span class='object_link'><a href="ComponentManager.html" title="FelFlame::ComponentManager (class)">ComponentManager</a></span></tt>)</span>
239
-
240
-
241
-
242
- </li>
243
-
244
- </ul>
245
-
246
- </div><table class="source_code">
247
- <tr>
248
- <td>
249
- <pre class="lines">
250
-
251
-
252
- 20
253
- 21
254
- 22
255
- 23
256
- 24
257
- 25
258
- 26
259
- 27
260
- 28
261
- 29
262
- 30
263
- 31
264
- 32
265
- 33
266
- 34
267
- 35
268
- 36
269
- 37
270
- 38
271
- 39
272
- 40
273
- 41
274
- 42
275
- 43
276
- 44
277
- 45
278
- 46
279
- 47
280
- 48
281
- 49</pre>
282
- </td>
283
- <td>
284
- <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 20</span>
285
-
286
- <span class='kw'>def</span> <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_attrs'>attrs</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_attrs_with_defaults'>attrs_with_defaults</span><span class='rparen'>)</span>
287
- <span class='kw'>if</span> <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_defined?'>const_defined?</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span>
288
- <span class='id identifier rubyid_raise'>raise</span><span class='lparen'>(</span><span class='const'>NameError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Component Manager &#39;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_component_name'>component_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>&#39; is already defined</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
289
- <span class='kw'>end</span>
290
-
291
- <span class='id identifier rubyid_const_set'>const_set</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='comma'>,</span> <span class='const'>Class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="ComponentManager.html" title="FelFlame::ComponentManager (class)">ComponentManager</a></span></span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
292
- <span class='id identifier rubyid_update_const_cache'>update_const_cache</span>
293
-
294
- <span class='id identifier rubyid_attrs'>attrs</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_attr'>attr</span><span class='op'>|</span>
295
- <span class='kw'>if</span> <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_method_defined?'>method_defined?</span><span class='lparen'>(</span><span class='id identifier rubyid_attr'>attr</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_method_defined?'>method_defined?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attr'>attr</span><span class='embexpr_end'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
296
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>NameError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>The attribute name \&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attr'>attr</span><span class='embexpr_end'>}</span><span class='tstring_content'>\&quot; is already a method</span><span class='tstring_end'>&quot;</span></span>
297
- <span class='kw'>end</span>
298
-
299
- <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_attr_accessor'>attr_accessor</span> <span class='id identifier rubyid_attr'>attr</span>
300
- <span class='kw'>end</span>
301
- <span class='id identifier rubyid_attrs_with_defaults'>attrs_with_defaults</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_attr'>attr</span><span class='comma'>,</span> <span class='id identifier rubyid__default'>_default</span><span class='op'>|</span>
302
- <span class='id identifier rubyid_attrs_with_defaults'>attrs_with_defaults</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid__default'>_default</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
303
- <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_attr_reader'>attr_reader</span> <span class='id identifier rubyid_attr'>attr</span>
304
- <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_define_method'>define_method</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attr'>attr</span><span class='embexpr_end'>}</span><span class='tstring_content'>=</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_value'>value</span><span class='op'>|</span>
305
- <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='kw'>unless</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_equal?'>equal?</span> <span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_attr'>attr</span><span class='rparen'>)</span>
306
- <span class='id identifier rubyid_instance_variable_set'>instance_variable_set</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_attr'>attr</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
307
- <span class='kw'>end</span>
308
- <span class='kw'>end</span>
309
- <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_define_method'>define_method</span><span class='lparen'>(</span><span class='symbol'>:set_defaults</span><span class='rparen'>)</span> <span class='kw'>do</span>
310
- <span class='id identifier rubyid_attrs_with_defaults'>attrs_with_defaults</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_attr'>attr</span><span class='comma'>,</span> <span class='id identifier rubyid_default'>default</span><span class='op'>|</span>
311
- <span class='id identifier rubyid_instance_variable_set'>instance_variable_set</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_attr'>attr</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_default'>default</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span><span class='rparen'>)</span>
312
- <span class='kw'>end</span>
313
- <span class='kw'>end</span>
314
- <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span>
315
- <span class='kw'>end</span></pre>
316
- </td>
317
- </tr>
318
- </table>
319
- </div>
320
-
321
- </div>
322
-
323
- </div>
324
-
325
- <div id="footer">
326
- Generated on Mon Jan 3 08:23:04 2022 by
327
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
328
- 0.9.26 (ruby-2.7.3).
329
- </div>
330
-
331
- </div>
332
- </body>
333
- </html>