<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
  Class: GrupoAlimenticio
  
    &mdash; Documentation by YARD 0.9.9
  
</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 = "GrupoAlimenticio";
  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?1"></iframe>
      <div id="resizer"></div>
    </div>

    <div id="main" tabindex="-1">
      <div id="header">
        <div id="menu">
  
    <a href="_index.html">Index (G)</a> &raquo;
    
    
    <span class="title">GrupoAlimenticio</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>

      <div id="content"><h1>Class: GrupoAlimenticio
  
  
  
</h1>
<div class="box_info">
  
  <dl>
    <dt>Inherits:</dt>
    <dd>
      <span class="inheritName"><span class='object_link'><a href="Lista.html" title="Lista (class)">Lista</a></span></span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next"><span class='object_link'><a href="Lista.html" title="Lista (class)">Lista</a></span></li>
          
            <li class="next">GrupoAlimenticio</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
    </dd>
  </dl>
  

  
  
  
  
  

  

  
  <dl>
    <dt>Defined in:</dt>
    <dd>lib/alimento/GrupoAlimenticio.rb<span class="defines">,<br />
  lib/alimento/version.rb</span>
</dd>
  </dl>
  
</div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    
<p>Representación de un grupo alimenticio con categoría Hereda de Lista</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Author:</p>
<ul class="author">
  
    <li>
      
      
      
      
        
        <div class='inline'>
<p>Sebastian Jose Diaz Rodriguez</p>
</div>
      
    </li>
  
</ul>
<p class="tag_title">Since:</p>
<ul class="since">
  
    <li>
      
      
      
      
        
        <div class='inline'>
<p>1.0.0</p>
</div>
      
    </li>
  
</ul>

</div>
  <h2>Constant Summary</h2>
  <dl class="constants">
    
      <dt id="VERSION-constant" class="">VERSION =
        <div class="docstring">
  <div class="discussion">
    
<p>Version de la clase GrupoAlimenticio</p>


  </div>
</div>
<div class="tags">
  

</div>
      </dt>
      <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>1.0.0</span><span class='tstring_end'>&quot;</span></span></pre></dd>
    
  </dl>




  <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="#categoria-instance_method" title="#categoria (instance method)">#<strong>categoria</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
    
      <span class="note title readonly">readonly</span>
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#Node-instance_method" title="#Node (instance method)">#<strong>Node</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
    
      <span class="note title readonly">readonly</span>
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>head Nodo en la cabeza de la lista.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#String-instance_method" title="#String (instance method)">#<strong>String</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
    
      <span class="note title readonly">readonly</span>
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>categoria categoria del grupo alimenticio representado.</p>
</div></span>
  
</li>

    
  </ul>



  
  
  <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Lista.html" title="Lista (class)">Lista</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="Lista.html#head-instance_method" title="Lista#head (method)">#head</a></span>, <span class='object_link'><a href="Lista.html#tail-instance_method" title="Lista#tail (method)">#tail</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="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(categoria)  &#x21d2; GrupoAlimenticio </a>
    

    
  </span>
  
  
    <span class="note title constructor">constructor</span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Constructor de GrupoAlimenticio.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#pop_alimento-instance_method" title="#pop_alimento (instance method)">#<strong>pop_alimento</strong>  &#x21d2; any<sup>?</sup> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Extracción del primer AlimentoCategorizable del GrupoAlimenticio.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#push_alimento-instance_method" title="#push_alimento (instance method)">#<strong>push_alimento</strong>(x)  &#x21d2; Node </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Inserción de AlimentoCategorizable por la cabeza de la lista del
GrupoAlimenticio.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#push_alimentos-instance_method" title="#push_alimentos (instance method)">#<strong>push_alimentos</strong>(x)  &#x21d2; Node </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Inserción de varios AlimentoCategorizable por la cabeza de la lista del
GrupoAlimenticio.</p>
</div></span>
  
</li>

      
    </ul>
  


  
  
  
  
  
  
  
  
  <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Lista.html" title="Lista (class)">Lista</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="Lista.html#each-instance_method" title="Lista#each (method)">#each</a></span>, <span class='object_link'><a href="Lista.html#pop_head-instance_method" title="Lista#pop_head (method)">#pop_head</a></span>, <span class='object_link'><a href="Lista.html#pop_tail-instance_method" title="Lista#pop_tail (method)">#pop_tail</a></span>, <span class='object_link'><a href="Lista.html#push-instance_method" title="Lista#push (method)">#push</a></span>, <span class='object_link'><a href="Lista.html#push_head-instance_method" title="Lista#push_head (method)">#push_head</a></span>, <span class='object_link'><a href="Lista.html#push_tail-instance_method" title="Lista#push_tail (method)">#push_tail</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>(categoria)  &#x21d2; <tt><span class='object_link'><a href="" title="GrupoAlimenticio (class)">GrupoAlimenticio</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Constructor de GrupoAlimenticio</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>categoria</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="#String-instance_method" title="GrupoAlimenticio#String (method)">String</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>categoria del grupo alimenticio</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Since:</p>
<ul class="since">
  
    <li>
      
      
      
      
        
        <div class='inline'>
<p>1.0.0</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


16
17
18
19</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/alimento/GrupoAlimenticio.rb', line 16</span>

<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_categoria'>categoria</span><span class='rparen'>)</span>
    <span class='kw'>super</span><span class='lparen'>(</span><span class='rparen'>)</span>
    <span class='ivar'>@categoria</span> <span class='op'>=</span> <span class='id identifier rubyid_categoria'>categoria</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="categoria-instance_method">
  
    #<strong>categoria</strong>  &#x21d2; <tt>Object</tt>  <span class="extras">(readonly)</span>
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
<p class="tag_title">Since:</p>
<ul class="since">
  
    <li>
      
      
      
      
        
        <div class='inline'>
<p>1.0.0</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


10
11
12</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/alimento/GrupoAlimenticio.rb', line 10</span>

<span class='kw'>def</span> <span class='id identifier rubyid_categoria'>categoria</span>
  <span class='ivar'>@categoria</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id=""></span>
      <div class="method_details ">
  <h3 class="signature " id="Node-instance_method">
  
    #<strong>Node</strong>  &#x21d2; <tt>Object</tt>  <span class="extras">(readonly)</span>
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>head Nodo en la cabeza de la lista</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Object</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>the current value of Node</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


9
10
11</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/alimento/GrupoAlimenticio.rb', line 9</span>

<span class='kw'>def</span> <span class='const'>Node</span>
  <span class='ivar'>@Node</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id=""></span>
      <div class="method_details ">
  <h3 class="signature " id="String-instance_method">
  
    #<strong>String</strong>  &#x21d2; <tt>Object</tt>  <span class="extras">(readonly)</span>
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>categoria categoria del grupo alimenticio representado</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Object</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>the current value of String</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


9
10
11</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/alimento/GrupoAlimenticio.rb', line 9</span>

<span class='kw'>def</span> <span class='const'>String</span>
  <span class='ivar'>@String</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="pop_alimento-instance_method">
  
    #<strong>pop_alimento</strong>  &#x21d2; <tt>any</tt><sup>?</sup> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Extracción del primer AlimentoCategorizable del GrupoAlimenticio</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>any</tt>, <tt>nil</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>devuelve el valor guardado en el primer nodo o nil si no hay nodos en el
GrupoAlimenticio</p>
</div>
      
    </li>
  
</ul>
<p class="tag_title">Since:</p>
<ul class="since">
  
    <li>
      
      
      
      
        
        <div class='inline'>
<p>1.0.0</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


46
47
48</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/alimento/GrupoAlimenticio.rb', line 46</span>

<span class='kw'>def</span> <span class='id identifier rubyid_pop_alimento'>pop_alimento</span><span class='lparen'>(</span><span class='rparen'>)</span>
    <span class='id identifier rubyid_pop_head'>pop_head</span><span class='lparen'>(</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="push_alimento-instance_method">
  
    #<strong>push_alimento</strong>(x)  &#x21d2; <tt><span class='object_link'><a href="#Node-instance_method" title="GrupoAlimenticio#Node (method)">Node</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Inserción de AlimentoCategorizable por la cabeza de la lista del
GrupoAlimenticio</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>x</span>
      
      
        <span class='type'>(<tt>any</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>valor del nuevo nodo</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="#Node-instance_method" title="GrupoAlimenticio#Node (method)">Node</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>Devuelve el head</p>
</div>
      
    </li>
  
</ul>
<p class="tag_title">Since:</p>
<ul class="since">
  
    <li>
      
      
      
      
        
        <div class='inline'>
<p>1.0.0</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


25
26
27
28
29</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/alimento/GrupoAlimenticio.rb', line 25</span>

<span class='kw'>def</span> <span class='id identifier rubyid_push_alimento'>push_alimento</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='rparen'>)</span>
    <span class='kw'>if</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="AlimentoCategorizable.html" title="AlimentoCategorizable (class)">AlimentoCategorizable</a></span></span><span class='rparen'>)</span><span class='rparen'>)</span>
        <span class='id identifier rubyid_push_head'>push_head</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="AlimentoCategorizable.html" title="AlimentoCategorizable (class)">AlimentoCategorizable</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="AlimentoCategorizable.html#initialize-instance_method" title="AlimentoCategorizable#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='period'>.</span><span class='id identifier rubyid_nombre'>nombre</span><span class='comma'>,</span> <span class='ivar'>@categoria</span><span class='comma'>,</span> <span class='id identifier rubyid_x'>x</span><span class='period'>.</span><span class='id identifier rubyid_glucidos'>glucidos</span><span class='comma'>,</span> <span class='id identifier rubyid_x'>x</span><span class='period'>.</span><span class='id identifier rubyid_proteinas'>proteinas</span><span class='comma'>,</span> <span class='id identifier rubyid_x'>x</span><span class='period'>.</span><span class='id identifier rubyid_lipidos'>lipidos</span><span class='rparen'>)</span><span class='rparen'>)</span>
    <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="push_alimentos-instance_method">
  
    #<strong>push_alimentos</strong>(x)  &#x21d2; <tt><span class='object_link'><a href="#Node-instance_method" title="GrupoAlimenticio#Node (method)">Node</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Inserción de varios AlimentoCategorizable por la cabeza de la lista del
GrupoAlimenticio</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>x</span>
      
      
        <span class='type'>(<tt>Array&lt;any&gt;</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>valores de los nuevos nodos</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="#Node-instance_method" title="GrupoAlimenticio#Node (method)">Node</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>Devuelve el head</p>
</div>
      
    </li>
  
</ul>
<p class="tag_title">Since:</p>
<ul class="since">
  
    <li>
      
      
      
      
        
        <div class='inline'>
<p>1.0.0</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


35
36
37
38
39
40
41</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/alimento/GrupoAlimenticio.rb', line 35</span>

<span class='kw'>def</span> <span class='id identifier rubyid_push_alimentos'>push_alimentos</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='rparen'>)</span>
    <span class='id identifier rubyid_x'>x</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_alimento'>alimento</span><span class='op'>|</span>
        <span class='kw'>if</span><span class='lparen'>(</span><span class='id identifier rubyid_alimento'>alimento</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="AlimentoCategorizable.html" title="AlimentoCategorizable (class)">AlimentoCategorizable</a></span></span><span class='rparen'>)</span><span class='rparen'>)</span>
            <span class='id identifier rubyid_push_head'>push_head</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="AlimentoCategorizable.html" title="AlimentoCategorizable (class)">AlimentoCategorizable</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="AlimentoCategorizable.html#initialize-instance_method" title="AlimentoCategorizable#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_alimento'>alimento</span><span class='period'>.</span><span class='id identifier rubyid_nombre'>nombre</span><span class='comma'>,</span> <span class='ivar'>@categoria</span><span class='comma'>,</span> <span class='id identifier rubyid_alimento'>alimento</span><span class='period'>.</span><span class='id identifier rubyid_glucidos'>glucidos</span><span class='comma'>,</span> <span class='id identifier rubyid_alimento'>alimento</span><span class='period'>.</span><span class='id identifier rubyid_proteinas'>proteinas</span><span class='comma'>,</span> <span class='id identifier rubyid_alimento'>alimento</span><span class='period'>.</span><span class='id identifier rubyid_lipidos'>lipidos</span><span class='rparen'>)</span><span class='rparen'>)</span>
        <span class='kw'>end</span>
    <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

      <div id="footer">
  Generated on Fri Nov 24 11:12:15 2017 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.9.9 (ruby-2.3.4).
</div>

    </div>
  </body>
</html>