Class: DailyPlan
Instance Method Summary collapse
Methods inherited from Plan
#budget, #get_price, #get_user_menu
Instance Method Details
#generate_meal_plan(context) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/daily_plan.rb', line 5 def generate_meal_plan(context) @user = context.user @menu = context. @budget = context.budget return { :breakfast => (get_price(context.BREAKFAST_PERCENT), context.BREAKFAST_IDENTIFIER).sample, :lunch => (get_price(context.LUNCH_PERCENT), context.LUNCH_IDENTIFIER).sample, :dinner => (get_price(context.DINNER_PERCENT), context.DINNER_IDENTIFIER).sample } end |