Class: Nodo

Inherits:
Struct
  • Object
show all
Defined in:
lib/alimentos/lista.rb

Overview

Creamos la estructura de un nodo nuevo, con su valor, su nodo siguiente y su nodo rpevio

Instance Attribute Summary collapse

Instance Attribute Details

#prevObject

Returns the value of attribute prev

Returns:

  • (Object)

    the current value of prev



3
4
5
# File 'lib/alimentos/lista.rb', line 3

def prev
  @prev
end

#siguienteObject

Returns the value of attribute siguiente

Returns:

  • (Object)

    the current value of siguiente



3
4
5
# File 'lib/alimentos/lista.rb', line 3

def siguiente
  @siguiente
end

#valorObject

Returns the value of attribute valor

Returns:

  • (Object)

    the current value of valor



3
4
5
# File 'lib/alimentos/lista.rb', line 3

def valor
  @valor
end