class MenuFoodGroups

Attributes

foodGroup[R]

Public Class Methods

new(a,b,c,d,e,f) click to toggle source

Creates a new diet Menu.

@param a the menu title @param b the menu percentage @param c the menu calories @param d the menu plates @param e the menu cvt @param f the menu food Group @return [Menu] the menu created.

Calls superclass method Menu::new
# File lib/menuFoodGroups.rb, line 13
def initialize (a,b,c,d,e,f)
  super(a,b,c,d,e)              
  @foodGroup = f
end

Public Instance Methods

to_s() click to toggle source

Returns the menu to string.

@return the menu to string.

Calls superclass method Menu#to_s
# File lib/menuFoodGroups.rb, line 21
def to_s
  s = " "
  s << super.to_s        
  s << "#{@foodGroup} \n"
  s
end