Class: Plato
- Inherits:
-
Object
- Object
- Plato
- Defined in:
- lib/menu/plato.rb
Instance Attribute Summary collapse
-
#ingesta ⇒ Object
Returns the value of attribute ingesta.
-
#nombre ⇒ Object
Returns the value of attribute nombre.
-
#porcion ⇒ Object
Returns the value of attribute porcion.
Instance Method Summary collapse
-
#initialize(nombre, porcion, ingesta) ⇒ Plato
constructor
A new instance of Plato.
- #to_s ⇒ Object
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
#ingesta ⇒ Object
Returns the value of attribute ingesta.
3 4 5 |
# File 'lib/menu/plato.rb', line 3 def ingesta @ingesta end |
#nombre ⇒ Object
Returns the value of attribute nombre.
3 4 5 |
# File 'lib/menu/plato.rb', line 3 def nombre @nombre end |
#porcion ⇒ Object
Returns the value of attribute porcion.
3 4 5 |
# File 'lib/menu/plato.rb', line 3 def porcion @porcion end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/menu/plato.rb', line 11 def to_s "- #{@nombre}, #{@porcion}, #{@ingesta}" end |