Class: MenuFoodGroups
Instance Attribute Summary collapse
-
#foodGroup ⇒ Object
readonly
Returns the value of attribute foodGroup.
Attributes inherited from Menu
#cal, #cvt, #menu, #percentage, #title
Instance Method Summary collapse
-
#initialize(a, b, c, d, e, f) ⇒ Menu
constructor
Creates a new diet Menu.
-
#to_s ⇒ Object
Returns the menu to string.
Methods inherited from Menu
#<=>, #footer_to_s, #head, #menu_to_s, #nutritionfact, #plate, #title_to_s
Constructor Details
#initialize(a, b, c, d, e, f) ⇒ Menu
Creates a new diet Menu.
13 14 15 16 |
# File 'lib/menuFoodGroups.rb', line 13 def initialize (a,b,c,d,e,f) super(a,b,c,d,e) @foodGroup = f end |
Instance Attribute Details
#foodGroup ⇒ Object (readonly)
Returns the value of attribute foodGroup.
3 4 5 |
# File 'lib/menuFoodGroups.rb', line 3 def foodGroup @foodGroup end |
Instance Method Details
#to_s ⇒ Object
Returns the menu to string.
21 22 23 24 25 26 |
# File 'lib/menuFoodGroups.rb', line 21 def to_s s = " " s << super.to_s s << "#{@foodGroup} \n" s end |