Class: Alimento::Nodo
- Inherits:
-
Struct
- Object
- Struct
- Alimento::Nodo
- Defined in:
- lib/alimento/dll.rb,
lib/alimento/dll.rb
Overview
Clase nodo, almacena un valor y apunta al nodo anterior y al siguiente. Es necesaria para la clase Dll
Instance Attribute Summary collapse
-
#next ⇒ Object
Returns the value of attribute next.
-
#prev ⇒ Object
Returns the value of attribute prev.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#to_s ⇒ Object
Operador de salida de la clase nodo.
Instance Attribute Details
#next ⇒ Object
Returns the value of attribute next
5 6 7 |
# File 'lib/alimento/dll.rb', line 5 def next @next end |
#prev ⇒ Object
Returns the value of attribute prev
5 6 7 |
# File 'lib/alimento/dll.rb', line 5 def prev @prev end |
#value ⇒ Object
Returns the value of attribute value
5 6 7 |
# File 'lib/alimento/dll.rb', line 5 def value @value end |
Instance Method Details
#to_s ⇒ Object
Operador de salida de la clase nodo. Imprime únicamente el valor del nodo
8 9 10 |
# File 'lib/alimento/dll.rb', line 8 def to_s value.to_s end |