<!DOCTYPE html> <html>
<head> <meta charset="utf-8">
<meta name=“viewport” content=“width=device-width, initial-scale=1.0”> <title>
Class: Menu_edad — Documentation by YARD 0.9.5
</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 = "Menu_edad"; 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"></iframe> <div id="resizer"></div> </div> <div id="main" tabindex="-1"> <div id="header"> <div id="menu"> <a href="_index.html">Index (M)</a> » <span class="title">Menu_edad</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> <iframe id="search_frame" src="class_list.html"></iframe> <div id="content"><h1>Class: Menu_edad
</h1> <div class=“box_info”>
<dl> <dt>Inherits:</dt> <dd> <span class="inheritName"><span class='object_link'><a href="Menu.html" title="Menu (class)">Menu</a></span></span> <ul class="fullTree"> <li>Object</li> <li class="next"><span class='object_link'><a href="Menu.html" title="Menu (class)">Menu</a></span></li> <li class="next">Menu_edad</li> </ul> <a href="#" class="inheritanceTree">show all</a> </dd> </dl> <dl> <dt>Defined in:</dt> <dd>lib/dieta/menu_edad.rb</dd> </dl>
</div>
<h2>Overview</h2><div class=“docstring”>
<div class="discussion">
<p>Clase Menú con edad (hija de la clase Menu)</p>
</div>
</div> <div class=“tags”>
<p class=“tag_title”>Author:</p> <ul class=“author”>
<li> <div class='inline'>
<p>alu0100880625</p> </div>
</li>
</ul>
</div>
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2> <ul class="summary"> <li class="public "> <span class="summary_signature"> <a href="#edad-instance_method" title="#edad (instance method)">#<strong>edad</strong> ⇒ String </a> </span> <span class="note title readonly">readonly</span> <span class="summary_desc"><div class='inline'>
<p>Cadena que almacena el rango de edades.</p> </div></span>
</li>
</ul> <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Menu.html" title="Menu (class)">Menu</a></span></h3> <p class="inherited"><span class='object_link'><a href="Menu.html#encabezado-instance_method" title="Menu#encabezado (method)">#encabezado</a></span>, <span class='object_link'><a href="Menu.html#platos-instance_method" title="Menu#platos (method)">#platos</a></span>, <span class='object_link'><a href="Menu.html#valores-instance_method" title="Menu#valores (method)">#valores</a></span></p> <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="#get_edad-instance_method" title="#get_edad (instance method)">#<strong>get_edad</strong> ⇒ String </a> </span> <span class="summary_desc"><div class='inline'>
<p>Método que retorna el rango de edades.</p> </div></span>
</li>
<li class="public "> <span class="summary_signature"> <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(edad, encabezado, platos, valores) ⇒ Object </a> </span> <span class="note title constructor">constructor</span> <span class="summary_desc"><div class='inline'>
<p>Método que instancia un objeto de la clase.</p> </div></span>
</li>
<li class="public "> <span class="summary_signature"> <a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> ⇒ String </a> </span> <span class="summary_desc"><div class='inline'>
<p>Método que formatea el menú para mostrarlo.</p> </div></span>
</li>
</ul> <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Menu.html" title="Menu (class)">Menu</a></span></h3> <p class="inherited"><span class='object_link'><a href="Menu.html#%3C%3D%3E-instance_method" title="Menu#<=> (method)">#<=></a></span>, <span class='object_link'><a href="Menu.html#get_grasas-instance_method" title="Menu#get_grasas (method)">#get_grasas</a></span>, <span class='object_link'><a href="Menu.html#get_hidratos-instance_method" title="Menu#get_hidratos (method)">#get_hidratos</a></span>, <span class='object_link'><a href="Menu.html#get_ingesta-instance_method" title="Menu#get_ingesta (method)">#get_ingesta</a></span>, <span class='object_link'><a href="Menu.html#get_plato-instance_method" title="Menu#get_plato (method)">#get_plato</a></span>, <span class='object_link'><a href="Menu.html#get_proteinas-instance_method" title="Menu#get_proteinas (method)">#get_proteinas</a></span>, <span class='object_link'><a href="Menu.html#get_titulo-instance_method" title="Menu#get_titulo (method)">#get_titulo</a></span>, <span class='object_link'><a href="Menu.html#get_vct-instance_method" title="Menu#get_vct (method)">#get_vct</a></span></p> <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>(edad, encabezado, platos, valores) ⇒ <tt>Object</tt>
</h3><div class=“docstring”>
<div class="discussion">
<p>Método que instancia un objeto de la clase</p>
</div>
</div> <div class=“tags”>
<p class="tag_title">Parameters:</p>
<ul class=“param”>
<li> <span class='name'>encabezado</span> <span class='type'>(<tt>Array</tt>)</span> — <div class='inline'>
<p>Array de Strings que almacena el título y el porcentaje de ingesta diaria</p> </div>
</li> <li> <span class='name'>platos</span> <span class='type'>(<tt>Array</tt>)</span> — <div class='inline'>
<p>Array bidimensional de Strings que almacena los ingredientes y cantidades, la forma de cocinar y las unidades</p> </div>
</li> <li> <span class='name'>valores</span> <span class='type'>(<tt>Array</tt>)</span> — <div class='inline'>
<p>Array que contiene los valores nutricionales y porcentaes</p> </div>
</li> <li> <span class='name'>edad</span> <span class='type'>(<tt>String</tt>)</span> — <div class='inline'>
<p>Almacena el rango de edades</p> </div>
</li>
</ul>
</div><table class=“source_code”>
<tr> <td> <pre class="lines">
13 14 15 16</pre>
</td> <td> <pre class="code"><span class="info file"># File 'lib/dieta/menu_edad.rb', line 13</span>
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_edad'>edad</span><span class='comma'>,</span> <span class='id identifier rubyid_encabezado'>encabezado</span><span class='comma'>,</span> <span class='id identifier rubyid_platos'>platos</span><span class='comma'>,</span> <span class='id identifier rubyid_valores'>valores</span><span class='rparen'>)</span>
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_encabezado'>encabezado</span><span class='comma'>,</span><span class='id identifier rubyid_platos'>platos</span><span class='comma'>,</span><span class='id identifier rubyid_valores'>valores</span><span class='rparen'>)</span> <span class='ivar'>@edad</span><span class='op'>=</span><span class='id identifier rubyid_edad'>edad</span>
<span class='kw'>end</span></pre>
</td> </tr>
</table> </div>
</div>
<div id="instance_attr_details" class="attr_details"> <h2>Instance Attribute Details</h2> <span id=""></span> <div class="method_details first"> <h3 class="signature first" id="edad-instance_method"> #<strong>edad</strong> ⇒ <tt>String</tt> <span class="extras">(readonly)</span>
</h3><div class=“docstring”>
<div class="discussion">
<p>Cadena que almacena el rango de edades</p>
</div>
</div> <div class=“tags”>
<p class=“tag_title”>Returns:</p> <ul class=“return”>
<li> <span class='type'>(<tt>String</tt>)</span> — <div class='inline'>
<p>the current value of edad</p> </div>
</li>
</ul>
</div><table class=“source_code”>
<tr> <td> <pre class="lines">
5 6 7</pre>
</td> <td> <pre class="code"><span class="info file"># File 'lib/dieta/menu_edad.rb', line 5</span>
<span class='kw'>def</span> <span class='id identifier rubyid_edad'>edad</span>
<span class='ivar'>@edad</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="get_edad-instance_method"> #<strong>get_edad</strong> ⇒ <tt>String</tt>
</h3><div class=“docstring”>
<div class="discussion">
<p>Método que retorna el rango de edades</p>
</div>
</div> <div class=“tags”>
<p class=“tag_title”>Returns:</p> <ul class=“return”>
<li> <span class='type'>(<tt>String</tt>)</span> — <div class='inline'>
<p>rango de edades</p> </div>
</li>
</ul>
</div><table class=“source_code”>
<tr> <td> <pre class="lines">
19 20 21</pre>
</td> <td> <pre class="code"><span class="info file"># File 'lib/dieta/menu_edad.rb', line 19</span>
<span class='kw'>def</span> <span class='id identifier rubyid_get_edad'>get_edad</span>
<span class='ivar'>@edad</span>
<span class='kw'>end</span></pre>
</td> </tr>
</table> </div>
<div class="method_details "> <h3 class="signature " id="to_s-instance_method"> #<strong>to_s</strong> ⇒ <tt>String</tt>
</h3><div class=“docstring”>
<div class="discussion">
<p>Método que formatea el menú para mostrarlo</p>
</div>
</div> <div class=“tags”>
<p class=“tag_title”>Returns:</p> <ul class=“return”>
<li> <span class='type'>(<tt>String</tt>)</span> — <div class='inline'>
<p>cadena que contiene el menú formateado</p> </div>
</li>
</ul>
</div><table class=“source_code”>
<tr> <td> <pre class="lines">
24 25 26 27</pre>
</td> <td> <pre class="code"><span class="info file"># File 'lib/dieta/menu_edad.rb', line 24</span>
<span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
<span class='id identifier rubyid_aux'>aux</span><span class='op'>=</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Edad: </span><span class='embexpr_beg'>#{</span><span class='ivar'>@edad</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span> <span class='id identifier rubyid_aux'>aux</span><span class='op'>+=</span><span class='kw'>super</span><span class='lparen'>(</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td> </tr>
</table> </div>
</div>
</div>
<div id="footer"> Generated on Wed Nov 23 10:39:49 2016 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.5 (ruby-2.3.1).
</div>
</div> </body>
</html>