Class: EtiquetaN
Direct Known Subclasses
Instance Attribute Summary collapse
-
#azucares ⇒ Object
Returns the value of attribute azucares.
-
#cantgrasas ⇒ Object
Returns the value of attribute cantgrasas.
-
#cantgrasasat ⇒ Object
Returns the value of attribute cantgrasasat.
-
#fibraa ⇒ Object
Returns the value of attribute fibraa.
-
#hidratosc ⇒ Object
Returns the value of attribute hidratosc.
-
#netiqueta ⇒ Object
Returns the value of attribute netiqueta.
-
#proteinas ⇒ Object
Returns the value of attribute proteinas.
-
#sales ⇒ Object
Returns the value of attribute sales.
-
#venergeticokcal ⇒ Object
Returns the value of attribute venergeticokcal.
-
#venergeticokJ ⇒ Object
Returns the value of attribute venergeticokJ.
Instance Method Summary collapse
-
#<=>(other) ⇒ Object
Method to get the value of proteins and do the comparison.
-
#initialize(netiqueta, venergeticokJ, venergeticokcal, cantgrasas, cantgrasasat, hidratosc, azucares, fibraa, proteinas, sales) ⇒ EtiquetaN
constructor
Initializing every characteristic about nutritional labels and his name.
Constructor Details
#initialize(netiqueta, venergeticokJ, venergeticokcal, cantgrasas, cantgrasasat, hidratosc, azucares, fibraa, proteinas, sales) ⇒ EtiquetaN
Initializing every characteristic about nutritional labels and his name
281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/menud/menud.rb', line 281 def initialize(netiqueta, venergeticokJ, venergeticokcal, cantgrasas, cantgrasasat, hidratosc, azucares, fibraa, proteinas, sales) @netiqueta = netiqueta @venergeticokJ = venergeticokJ @venergeticokcal = venergeticokcal @cantgrasas = cantgrasas @cantgrasasat = cantgrasasat @hidratosc = hidratosc @azucares = azucares @fibraa = fibraa @proteinas = proteinas @sales = sales end |
Instance Attribute Details
#azucares ⇒ Object
Returns the value of attribute azucares.
278 279 280 |
# File 'lib/menud/menud.rb', line 278 def azucares @azucares end |
#cantgrasas ⇒ Object
Returns the value of attribute cantgrasas.
278 279 280 |
# File 'lib/menud/menud.rb', line 278 def cantgrasas @cantgrasas end |
#cantgrasasat ⇒ Object
Returns the value of attribute cantgrasasat.
278 279 280 |
# File 'lib/menud/menud.rb', line 278 def cantgrasasat @cantgrasasat end |
#fibraa ⇒ Object
Returns the value of attribute fibraa.
278 279 280 |
# File 'lib/menud/menud.rb', line 278 def fibraa @fibraa end |
#hidratosc ⇒ Object
Returns the value of attribute hidratosc.
278 279 280 |
# File 'lib/menud/menud.rb', line 278 def hidratosc @hidratosc end |
#netiqueta ⇒ Object
Returns the value of attribute netiqueta.
278 279 280 |
# File 'lib/menud/menud.rb', line 278 def netiqueta @netiqueta end |
#proteinas ⇒ Object
Returns the value of attribute proteinas.
278 279 280 |
# File 'lib/menud/menud.rb', line 278 def proteinas @proteinas end |
#sales ⇒ Object
Returns the value of attribute sales.
278 279 280 |
# File 'lib/menud/menud.rb', line 278 def sales @sales end |
#venergeticokcal ⇒ Object
Returns the value of attribute venergeticokcal.
278 279 280 |
# File 'lib/menud/menud.rb', line 278 def venergeticokcal @venergeticokcal end |
#venergeticokJ ⇒ Object
Returns the value of attribute venergeticokJ.
278 279 280 |
# File 'lib/menud/menud.rb', line 278 def venergeticokJ @venergeticokJ end |
Instance Method Details
#<=>(other) ⇒ Object
Method to get the value of proteins and do the comparison
308 309 310 311 312 313 |
# File 'lib/menud/menud.rb', line 308 def <=> (other) @proteinas <=> other.proteinas end |