Class: Plato

Inherits:
Object
  • Object
show all
Defined in:
lib/menu/plato.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(nombre, porcion, ingesta) ⇒ Plato

Returns a new instance of Plato.



5
6
7
8
9
# File 'lib/menu/plato.rb', line 5

def initialize(nombre, porcion, ingesta)
   @nombre = nombre
   @porcion = porcion
   @ingesta = ingesta
end

Instance Attribute Details

#ingestaObject

Returns the value of attribute ingesta.



3
4
5
# File 'lib/menu/plato.rb', line 3

def ingesta
  @ingesta
end

#nombreObject

Returns the value of attribute nombre.



3
4
5
# File 'lib/menu/plato.rb', line 3

def nombre
  @nombre
end

#porcionObject

Returns the value of attribute porcion.



3
4
5
# File 'lib/menu/plato.rb', line 3

def porcion
  @porcion
end

Instance Method Details

#to_sObject



11
12
13
# File 'lib/menu/plato.rb', line 11

def to_s
    "- #{@nombre}, #{@porcion}, #{@ingesta}"
end