Last active
December 18, 2015 16:19
-
-
Save ashleygwilliams/5811063 to your computer and use it in GitHub Desktop.
homework for alex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#fill out this meal array with items and details hashes. make sure you have at least 5 items | |
ITEMS = [ "ITEM" => {:calories=> ??, :fat => ??, :carbs => ??, :protein=>}, | |
"ITEM" => {:calories=> ??, :fat => ??, :carbs => ??, :protein=>} | |
] | |
#here is a method that randomly makes you eat x portions of the food | |
def generatePortions | |
portions = [] | |
rand(20).times do | |
portions.push(ITEMS.sample) | |
end | |
portions | |
end | |
#create a hash that counts the portions and adds them to a new hash | |
#then create methods that count the calories, fat, carbs, and protein in the meal | |
#print a meal summary to the screen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
read http://www.w3schools.com/sql/ << teach you how to build sql tables | |
port the scraper lib from the sinatra app to the rails app | |
pay attention to what your models are!! | |
tables = > columns :: models => attributes | |
what data am i scraping || what attributes does my model have || what columns should my table have | |
SCRAPER || RAILS || SQL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment