foodAX 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +12 -0
- data/.travis.yml +6 -0
- data/Gemfile +6 -0
- data/Guardfile +82 -0
- data/LICENSE.txt +21 -0
- data/README.md +70 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/docs/DLLModule.html +126 -0
- data/docs/DLLModule/DLL.html +1185 -0
- data/docs/DLLModule/Node.html +409 -0
- data/docs/Food.html +567 -0
- data/docs/FoodAbstract.html +807 -0
- data/docs/FoodGem.html +156 -0
- data/docs/_config.yml +1 -0
- data/docs/_index.html +154 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +492 -0
- data/docs/file.README.html +161 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +161 -0
- data/docs/input/dish_recipes.txt +18 -0
- data/docs/input/food-data.txt +19 -0
- data/docs/input/samples-data.txt +9 -0
- data/docs/js/app.js +248 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +267 -0
- data/docs/top-level-namespace.html +297 -0
- data/food.gemspec +45 -0
- data/input/dish_recipes.txt +18 -0
- data/input/food-data.txt +19 -0
- data/input/samples-data.txt +9 -0
- data/lib/dsl/harvard_dish.rb +123 -0
- data/lib/food.rb +12 -0
- data/lib/food/dll.rb +168 -0
- data/lib/food/food_class.rb +139 -0
- data/lib/food/functions.rb +144 -0
- data/lib/food/sort.rb +135 -0
- data/lib/food/version.rb +6 -0
- metadata +216 -0
@@ -0,0 +1,409 @@
|
|
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
|
+
Class: DLLModule::Node
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.9
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "DLLModule::Node";
|
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 (N)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../DLLModule.html" title="DLLModule (module)">DLLModule</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Node</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>Class: DLLModule::Node
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Struct</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">Struct</li>
|
78
|
+
|
79
|
+
<li class="next">DLLModule::Node</li>
|
80
|
+
|
81
|
+
</ul>
|
82
|
+
<a href="#" class="inheritanceTree">show all</a>
|
83
|
+
|
84
|
+
</dd>
|
85
|
+
</dl>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<dl>
|
98
|
+
<dt>Defined in:</dt>
|
99
|
+
<dd>lib/food/dll.rb</dd>
|
100
|
+
</dl>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
105
|
+
<div class="discussion">
|
106
|
+
|
107
|
+
<p>Struct Node for Doubly Linked List</p>
|
108
|
+
|
109
|
+
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
<div class="tags">
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
120
|
+
<ul class="summary">
|
121
|
+
|
122
|
+
<li class="public ">
|
123
|
+
<span class="summary_signature">
|
124
|
+
|
125
|
+
<a href="#next-instance_method" title="#next (instance method)">#<strong>next</strong> ⇒ Object </a>
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
</span>
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<span class="summary_desc"><div class='inline'>
|
143
|
+
<p>Returns the value of attribute next.</p>
|
144
|
+
</div></span>
|
145
|
+
|
146
|
+
</li>
|
147
|
+
|
148
|
+
|
149
|
+
<li class="public ">
|
150
|
+
<span class="summary_signature">
|
151
|
+
|
152
|
+
<a href="#prev-instance_method" title="#prev (instance method)">#<strong>prev</strong> ⇒ Object </a>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
</span>
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
<span class="summary_desc"><div class='inline'>
|
170
|
+
<p>Returns the value of attribute prev.</p>
|
171
|
+
</div></span>
|
172
|
+
|
173
|
+
</li>
|
174
|
+
|
175
|
+
|
176
|
+
<li class="public ">
|
177
|
+
<span class="summary_signature">
|
178
|
+
|
179
|
+
<a href="#value-instance_method" title="#value (instance method)">#<strong>value</strong> ⇒ Object </a>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
</span>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
<span class="summary_desc"><div class='inline'>
|
197
|
+
<p>Returns the value of attribute value.</p>
|
198
|
+
</div></span>
|
199
|
+
|
200
|
+
</li>
|
201
|
+
|
202
|
+
|
203
|
+
</ul>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
<div id="instance_attr_details" class="attr_details">
|
211
|
+
<h2>Instance Attribute Details</h2>
|
212
|
+
|
213
|
+
|
214
|
+
<span id="next=-instance_method"></span>
|
215
|
+
<div class="method_details first">
|
216
|
+
<h3 class="signature first" id="next-instance_method">
|
217
|
+
|
218
|
+
#<strong>next</strong> ⇒ <tt>Object</tt>
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
</h3><div class="docstring">
|
225
|
+
<div class="discussion">
|
226
|
+
|
227
|
+
<p>Returns the value of attribute next</p>
|
228
|
+
|
229
|
+
|
230
|
+
</div>
|
231
|
+
</div>
|
232
|
+
<div class="tags">
|
233
|
+
|
234
|
+
<p class="tag_title">Returns:</p>
|
235
|
+
<ul class="return">
|
236
|
+
|
237
|
+
<li>
|
238
|
+
|
239
|
+
|
240
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
—
|
245
|
+
<div class='inline'>
|
246
|
+
<p>the current value of next</p>
|
247
|
+
</div>
|
248
|
+
|
249
|
+
</li>
|
250
|
+
|
251
|
+
</ul>
|
252
|
+
|
253
|
+
</div><table class="source_code">
|
254
|
+
<tr>
|
255
|
+
<td>
|
256
|
+
<pre class="lines">
|
257
|
+
|
258
|
+
|
259
|
+
7
|
260
|
+
8
|
261
|
+
9</pre>
|
262
|
+
</td>
|
263
|
+
<td>
|
264
|
+
<pre class="code"><span class="info file"># File 'lib/food/dll.rb', line 7</span>
|
265
|
+
|
266
|
+
<span class='kw'>def</span> <span class='kw'>next</span>
|
267
|
+
<span class='ivar'>@next</span>
|
268
|
+
<span class='kw'>end</span></pre>
|
269
|
+
</td>
|
270
|
+
</tr>
|
271
|
+
</table>
|
272
|
+
</div>
|
273
|
+
|
274
|
+
|
275
|
+
<span id="prev=-instance_method"></span>
|
276
|
+
<div class="method_details ">
|
277
|
+
<h3 class="signature " id="prev-instance_method">
|
278
|
+
|
279
|
+
#<strong>prev</strong> ⇒ <tt>Object</tt>
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
</h3><div class="docstring">
|
286
|
+
<div class="discussion">
|
287
|
+
|
288
|
+
<p>Returns the value of attribute prev</p>
|
289
|
+
|
290
|
+
|
291
|
+
</div>
|
292
|
+
</div>
|
293
|
+
<div class="tags">
|
294
|
+
|
295
|
+
<p class="tag_title">Returns:</p>
|
296
|
+
<ul class="return">
|
297
|
+
|
298
|
+
<li>
|
299
|
+
|
300
|
+
|
301
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
—
|
306
|
+
<div class='inline'>
|
307
|
+
<p>the current value of prev</p>
|
308
|
+
</div>
|
309
|
+
|
310
|
+
</li>
|
311
|
+
|
312
|
+
</ul>
|
313
|
+
|
314
|
+
</div><table class="source_code">
|
315
|
+
<tr>
|
316
|
+
<td>
|
317
|
+
<pre class="lines">
|
318
|
+
|
319
|
+
|
320
|
+
7
|
321
|
+
8
|
322
|
+
9</pre>
|
323
|
+
</td>
|
324
|
+
<td>
|
325
|
+
<pre class="code"><span class="info file"># File 'lib/food/dll.rb', line 7</span>
|
326
|
+
|
327
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_prev'>prev</span>
|
328
|
+
<span class='ivar'>@prev</span>
|
329
|
+
<span class='kw'>end</span></pre>
|
330
|
+
</td>
|
331
|
+
</tr>
|
332
|
+
</table>
|
333
|
+
</div>
|
334
|
+
|
335
|
+
|
336
|
+
<span id="value=-instance_method"></span>
|
337
|
+
<div class="method_details ">
|
338
|
+
<h3 class="signature " id="value-instance_method">
|
339
|
+
|
340
|
+
#<strong>value</strong> ⇒ <tt>Object</tt>
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
</h3><div class="docstring">
|
347
|
+
<div class="discussion">
|
348
|
+
|
349
|
+
<p>Returns the value of attribute value</p>
|
350
|
+
|
351
|
+
|
352
|
+
</div>
|
353
|
+
</div>
|
354
|
+
<div class="tags">
|
355
|
+
|
356
|
+
<p class="tag_title">Returns:</p>
|
357
|
+
<ul class="return">
|
358
|
+
|
359
|
+
<li>
|
360
|
+
|
361
|
+
|
362
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
—
|
367
|
+
<div class='inline'>
|
368
|
+
<p>the current value of value</p>
|
369
|
+
</div>
|
370
|
+
|
371
|
+
</li>
|
372
|
+
|
373
|
+
</ul>
|
374
|
+
|
375
|
+
</div><table class="source_code">
|
376
|
+
<tr>
|
377
|
+
<td>
|
378
|
+
<pre class="lines">
|
379
|
+
|
380
|
+
|
381
|
+
7
|
382
|
+
8
|
383
|
+
9</pre>
|
384
|
+
</td>
|
385
|
+
<td>
|
386
|
+
<pre class="code"><span class="info file"># File 'lib/food/dll.rb', line 7</span>
|
387
|
+
|
388
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_value'>value</span>
|
389
|
+
<span class='ivar'>@value</span>
|
390
|
+
<span class='kw'>end</span></pre>
|
391
|
+
</td>
|
392
|
+
</tr>
|
393
|
+
</table>
|
394
|
+
</div>
|
395
|
+
|
396
|
+
</div>
|
397
|
+
|
398
|
+
|
399
|
+
</div>
|
400
|
+
|
401
|
+
<div id="footer">
|
402
|
+
Generated on Wed Nov 15 11:48:20 2017 by
|
403
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
404
|
+
0.9.9 (ruby-2.3.0).
|
405
|
+
</div>
|
406
|
+
|
407
|
+
</div>
|
408
|
+
</body>
|
409
|
+
</html>
|
data/docs/Food.html
ADDED
@@ -0,0 +1,567 @@
|
|
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
|
+
Class: Food
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.9
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "Food";
|
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 (F)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">Food</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>Class: Food
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName"><span class='object_link'><a href="FoodAbstract.html" title="FoodAbstract (class)">FoodAbstract</a></span></span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next"><span class='object_link'><a href="FoodAbstract.html" title="FoodAbstract (class)">FoodAbstract</a></span></li>
|
78
|
+
|
79
|
+
<li class="next">Food</li>
|
80
|
+
|
81
|
+
</ul>
|
82
|
+
<a href="#" class="inheritanceTree">show all</a>
|
83
|
+
|
84
|
+
</dd>
|
85
|
+
</dl>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
<dl>
|
93
|
+
<dt>Includes:</dt>
|
94
|
+
<dd>Comparable</dd>
|
95
|
+
</dl>
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
<dl>
|
103
|
+
<dt>Defined in:</dt>
|
104
|
+
<dd>lib/food/food_class.rb</dd>
|
105
|
+
</dl>
|
106
|
+
|
107
|
+
</div>
|
108
|
+
|
109
|
+
<h2>Overview</h2><div class="docstring">
|
110
|
+
<div class="discussion">
|
111
|
+
|
112
|
+
<p>Class for Food that inherit FoodAbstract</p>
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
</div>
|
117
|
+
<div class="tags">
|
118
|
+
|
119
|
+
|
120
|
+
</div>
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
125
|
+
<ul class="summary">
|
126
|
+
|
127
|
+
<li class="public ">
|
128
|
+
<span class="summary_signature">
|
129
|
+
|
130
|
+
<a href="#group_name-instance_method" title="#group_name (instance method)">#<strong>group_name</strong> ⇒ Object </a>
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
</span>
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
<span class="note title readonly">readonly</span>
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
150
|
+
|
151
|
+
</li>
|
152
|
+
|
153
|
+
|
154
|
+
</ul>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="FoodAbstract.html" title="FoodAbstract (class)">FoodAbstract</a></span></h3>
|
161
|
+
<p class="inherited"><span class='object_link'><a href="FoodAbstract.html#energetic_content-instance_method" title="FoodAbstract#energetic_content (method)">#energetic_content</a></span>, <span class='object_link'><a href="FoodAbstract.html#glucid_quantity-instance_method" title="FoodAbstract#glucid_quantity (method)">#glucid_quantity</a></span>, <span class='object_link'><a href="FoodAbstract.html#lipid_quantity-instance_method" title="FoodAbstract#lipid_quantity (method)">#lipid_quantity</a></span>, <span class='object_link'><a href="FoodAbstract.html#name-instance_method" title="FoodAbstract#name (method)">#name</a></span>, <span class='object_link'><a href="FoodAbstract.html#protein_quantity-instance_method" title="FoodAbstract#protein_quantity (method)">#protein_quantity</a></span></p>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
<h2>
|
166
|
+
Instance Method Summary
|
167
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
168
|
+
</h2>
|
169
|
+
|
170
|
+
<ul class="summary">
|
171
|
+
|
172
|
+
<li class="public ">
|
173
|
+
<span class="summary_signature">
|
174
|
+
|
175
|
+
<a href="#<=>-instance_method" title="#<=> (instance method)">#<strong><=></strong>(food) ⇒ String </a>
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
</span>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
<span class="summary_desc"><div class='inline'>
|
190
|
+
<p>Essential comparating for using Comparable Module.</p>
|
191
|
+
</div></span>
|
192
|
+
|
193
|
+
</li>
|
194
|
+
|
195
|
+
|
196
|
+
<li class="public ">
|
197
|
+
<span class="summary_signature">
|
198
|
+
|
199
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(name, protein_energy_pair, glucid_energy_pair, lipid_energy_pair, group_name) ⇒ Food </a>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
</span>
|
204
|
+
|
205
|
+
|
206
|
+
<span class="note title constructor">constructor</span>
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
<span class="summary_desc"><div class='inline'>
|
216
|
+
<p>Constructor of Food with the group name.</p>
|
217
|
+
</div></span>
|
218
|
+
|
219
|
+
</li>
|
220
|
+
|
221
|
+
|
222
|
+
<li class="public ">
|
223
|
+
<span class="summary_signature">
|
224
|
+
|
225
|
+
<a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> ⇒ String </a>
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
</span>
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
<span class="summary_desc"><div class='inline'>
|
240
|
+
<p>Return string with the output for the food calling the father.</p>
|
241
|
+
</div></span>
|
242
|
+
|
243
|
+
</li>
|
244
|
+
|
245
|
+
|
246
|
+
</ul>
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="FoodAbstract.html" title="FoodAbstract (class)">FoodAbstract</a></span></h3>
|
260
|
+
<p class="inherited"><span class='object_link'><a href="FoodAbstract.html#calculate_energetic_content-instance_method" title="FoodAbstract#calculate_energetic_content (method)">#calculate_energetic_content</a></span></p>
|
261
|
+
<div id="constructor_details" class="method_details_list">
|
262
|
+
<h2>Constructor Details</h2>
|
263
|
+
|
264
|
+
<div class="method_details first">
|
265
|
+
<h3 class="signature first" id="initialize-instance_method">
|
266
|
+
|
267
|
+
#<strong>initialize</strong>(name, protein_energy_pair, glucid_energy_pair, lipid_energy_pair, group_name) ⇒ <tt><span class='object_link'><a href="" title="Food (class)">Food</a></span></tt>
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
</h3><div class="docstring">
|
274
|
+
<div class="discussion">
|
275
|
+
|
276
|
+
<p>Constructor of Food with the group name</p>
|
277
|
+
|
278
|
+
|
279
|
+
</div>
|
280
|
+
</div>
|
281
|
+
<div class="tags">
|
282
|
+
<p class="tag_title">Parameters:</p>
|
283
|
+
<ul class="param">
|
284
|
+
|
285
|
+
<li>
|
286
|
+
|
287
|
+
<span class='name'>name</span>
|
288
|
+
|
289
|
+
|
290
|
+
<span class='type'>(<tt>String</tt>)</span>
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
—
|
295
|
+
<div class='inline'>
|
296
|
+
<p>the name for the food.</p>
|
297
|
+
</div>
|
298
|
+
|
299
|
+
</li>
|
300
|
+
|
301
|
+
<li>
|
302
|
+
|
303
|
+
<span class='name'>protein_energy_pair</span>
|
304
|
+
|
305
|
+
|
306
|
+
<span class='type'>(<tt>pair</tt>)</span>
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
—
|
311
|
+
<div class='inline'>
|
312
|
+
<p>pair of protein number and energy.</p>
|
313
|
+
</div>
|
314
|
+
|
315
|
+
</li>
|
316
|
+
|
317
|
+
<li>
|
318
|
+
|
319
|
+
<span class='name'>glucid_energy_pair</span>
|
320
|
+
|
321
|
+
|
322
|
+
<span class='type'>(<tt>pair</tt>)</span>
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
—
|
327
|
+
<div class='inline'>
|
328
|
+
<p>pair of glucid number and energy</p>
|
329
|
+
</div>
|
330
|
+
|
331
|
+
</li>
|
332
|
+
|
333
|
+
<li>
|
334
|
+
|
335
|
+
<span class='name'>lipid_energy_pair</span>
|
336
|
+
|
337
|
+
|
338
|
+
<span class='type'>(<tt>pair</tt>)</span>
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
—
|
343
|
+
<div class='inline'>
|
344
|
+
<p>pair of lipid number and energy</p>
|
345
|
+
</div>
|
346
|
+
|
347
|
+
</li>
|
348
|
+
|
349
|
+
<li>
|
350
|
+
|
351
|
+
<span class='name'>group_name</span>
|
352
|
+
|
353
|
+
|
354
|
+
<span class='type'>(<tt>String</tt>)</span>
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
—
|
359
|
+
<div class='inline'>
|
360
|
+
<p>the name for the food group.</p>
|
361
|
+
</div>
|
362
|
+
|
363
|
+
</li>
|
364
|
+
|
365
|
+
</ul>
|
366
|
+
|
367
|
+
|
368
|
+
</div><table class="source_code">
|
369
|
+
<tr>
|
370
|
+
<td>
|
371
|
+
<pre class="lines">
|
372
|
+
|
373
|
+
|
374
|
+
77
|
375
|
+
78
|
376
|
+
79
|
377
|
+
80</pre>
|
378
|
+
</td>
|
379
|
+
<td>
|
380
|
+
<pre class="code"><span class="info file"># File 'lib/food/food_class.rb', line 77</span>
|
381
|
+
|
382
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_protein_energy_pair'>protein_energy_pair</span><span class='comma'>,</span> <span class='id identifier rubyid_glucid_energy_pair'>glucid_energy_pair</span><span class='comma'>,</span> <span class='id identifier rubyid_lipid_energy_pair'>lipid_energy_pair</span><span class='comma'>,</span> <span class='id identifier rubyid_group_name'>group_name</span><span class='rparen'>)</span>
|
383
|
+
<span class='ivar'>@group_name</span> <span class='op'>=</span> <span class='id identifier rubyid_group_name'>group_name</span>
|
384
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_protein_energy_pair'>protein_energy_pair</span><span class='comma'>,</span> <span class='id identifier rubyid_glucid_energy_pair'>glucid_energy_pair</span><span class='comma'>,</span> <span class='id identifier rubyid_lipid_energy_pair'>lipid_energy_pair</span><span class='rparen'>)</span>
|
385
|
+
<span class='kw'>end</span></pre>
|
386
|
+
</td>
|
387
|
+
</tr>
|
388
|
+
</table>
|
389
|
+
</div>
|
390
|
+
|
391
|
+
</div>
|
392
|
+
|
393
|
+
<div id="instance_attr_details" class="attr_details">
|
394
|
+
<h2>Instance Attribute Details</h2>
|
395
|
+
|
396
|
+
|
397
|
+
<span id=""></span>
|
398
|
+
<div class="method_details first">
|
399
|
+
<h3 class="signature first" id="group_name-instance_method">
|
400
|
+
|
401
|
+
#<strong>group_name</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
</h3><table class="source_code">
|
408
|
+
<tr>
|
409
|
+
<td>
|
410
|
+
<pre class="lines">
|
411
|
+
|
412
|
+
|
413
|
+
69
|
414
|
+
70
|
415
|
+
71</pre>
|
416
|
+
</td>
|
417
|
+
<td>
|
418
|
+
<pre class="code"><span class="info file"># File 'lib/food/food_class.rb', line 69</span>
|
419
|
+
|
420
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_group_name'>group_name</span>
|
421
|
+
<span class='ivar'>@group_name</span>
|
422
|
+
<span class='kw'>end</span></pre>
|
423
|
+
</td>
|
424
|
+
</tr>
|
425
|
+
</table>
|
426
|
+
</div>
|
427
|
+
|
428
|
+
</div>
|
429
|
+
|
430
|
+
|
431
|
+
<div id="instance_method_details" class="method_details_list">
|
432
|
+
<h2>Instance Method Details</h2>
|
433
|
+
|
434
|
+
|
435
|
+
<div class="method_details first">
|
436
|
+
<h3 class="signature first" id="<=>-instance_method">
|
437
|
+
|
438
|
+
#<strong><=></strong>(food) ⇒ <tt>String</tt>
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
|
444
|
+
</h3><div class="docstring">
|
445
|
+
<div class="discussion">
|
446
|
+
|
447
|
+
<p>Essential comparating for using Comparable Module</p>
|
448
|
+
|
449
|
+
|
450
|
+
</div>
|
451
|
+
</div>
|
452
|
+
<div class="tags">
|
453
|
+
|
454
|
+
<p class="tag_title">Returns:</p>
|
455
|
+
<ul class="return">
|
456
|
+
|
457
|
+
<li>
|
458
|
+
|
459
|
+
|
460
|
+
<span class='type'>(<tt>String</tt>)</span>
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
—
|
465
|
+
<div class='inline'>
|
466
|
+
<p>Return which food is higher depending on the enrgetic content</p>
|
467
|
+
</div>
|
468
|
+
|
469
|
+
</li>
|
470
|
+
|
471
|
+
</ul>
|
472
|
+
|
473
|
+
</div><table class="source_code">
|
474
|
+
<tr>
|
475
|
+
<td>
|
476
|
+
<pre class="lines">
|
477
|
+
|
478
|
+
|
479
|
+
90
|
480
|
+
91
|
481
|
+
92
|
482
|
+
93</pre>
|
483
|
+
</td>
|
484
|
+
<td>
|
485
|
+
<pre class="code"><span class="info file"># File 'lib/food/food_class.rb', line 90</span>
|
486
|
+
|
487
|
+
<span class='kw'>def</span> <span class='op'><=></span> <span class='lparen'>(</span><span class='id identifier rubyid_food'>food</span><span class='rparen'>)</span>
|
488
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='kw'>unless</span> <span class='id identifier rubyid_food'>food</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='const'>Food</span>
|
489
|
+
<span class='kw'>return</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_energetic_content'>energetic_content</span> <span class='op'><=></span> <span class='id identifier rubyid_food'>food</span><span class='period'>.</span><span class='id identifier rubyid_energetic_content'>energetic_content</span>
|
490
|
+
<span class='kw'>end</span></pre>
|
491
|
+
</td>
|
492
|
+
</tr>
|
493
|
+
</table>
|
494
|
+
</div>
|
495
|
+
|
496
|
+
<div class="method_details ">
|
497
|
+
<h3 class="signature " id="to_s-instance_method">
|
498
|
+
|
499
|
+
#<strong>to_s</strong> ⇒ <tt>String</tt>
|
500
|
+
|
501
|
+
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
</h3><div class="docstring">
|
506
|
+
<div class="discussion">
|
507
|
+
|
508
|
+
<p>Return string with the output for the food calling the father</p>
|
509
|
+
|
510
|
+
|
511
|
+
</div>
|
512
|
+
</div>
|
513
|
+
<div class="tags">
|
514
|
+
|
515
|
+
<p class="tag_title">Returns:</p>
|
516
|
+
<ul class="return">
|
517
|
+
|
518
|
+
<li>
|
519
|
+
|
520
|
+
|
521
|
+
<span class='type'>(<tt>String</tt>)</span>
|
522
|
+
|
523
|
+
|
524
|
+
|
525
|
+
—
|
526
|
+
<div class='inline'>
|
527
|
+
<p>output of food</p>
|
528
|
+
</div>
|
529
|
+
|
530
|
+
</li>
|
531
|
+
|
532
|
+
</ul>
|
533
|
+
|
534
|
+
</div><table class="source_code">
|
535
|
+
<tr>
|
536
|
+
<td>
|
537
|
+
<pre class="lines">
|
538
|
+
|
539
|
+
|
540
|
+
84
|
541
|
+
85
|
542
|
+
86</pre>
|
543
|
+
</td>
|
544
|
+
<td>
|
545
|
+
<pre class="code"><span class="info file"># File 'lib/food/food_class.rb', line 84</span>
|
546
|
+
|
547
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
|
548
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Grupo: </span><span class='embexpr_beg'>#{</span><span class='ivar'>@group_name</span><span class='embexpr_end'>}</span><span class='tstring_content'> | </span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='kw'>super</span>
|
549
|
+
<span class='kw'>end</span></pre>
|
550
|
+
</td>
|
551
|
+
</tr>
|
552
|
+
</table>
|
553
|
+
</div>
|
554
|
+
|
555
|
+
</div>
|
556
|
+
|
557
|
+
</div>
|
558
|
+
|
559
|
+
<div id="footer">
|
560
|
+
Generated on Wed Nov 15 11:48:21 2017 by
|
561
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
562
|
+
0.9.9 (ruby-2.3.0).
|
563
|
+
</div>
|
564
|
+
|
565
|
+
</div>
|
566
|
+
</body>
|
567
|
+
</html>
|