Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def initialize_commands service, stream, mapping
- command_list = [CreateNewFoodCommand, CreateNewRecipeCommand,
- PrintFoodCommand, PrintAllCommand, FindFoodCommand,
- AddItemToLogCommand, ShowLogSummaryCommand,
- ShowLogSummaryTodayCommand, AddItemToLogWithDateCommand,
- ShowLogSummaryWithDateCommand, DeleteItemFromLogCommand,
- DeleteItemFromLogWithDateCommand, SaveCommand
- ]
- command_list.each do |command|
- mapping = command.new(service, stream).populate(mapping)
- end
- return mapping
- end
- -----------------------------------------
- def populate mapping
- mapping[@expression] = self
- return mapping
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement