Fork this Gist. In your copy, refactor the Ruby Hashes below to improve readability.
foods = {
"apples" => 23,
"grapes" => 507,
"eggs" => 48
}
person = { "height" => "6 ft",
"weight" => "160 lbs"
}
post = { "image_src" => "./images/beach.png",
"caption" => "At the beach with my besties",
"timestamp" => "4:37 PM August 13, 2019",
"number_likes" => 0,
"comments" => []
}
post2 = {
"image_src" => "./images/holiday-party.png",
"caption" => "What a great holiday party omg",
"timestamp" => "11:37 PM December 31, 2019",
"number_likes" => 13,
"comments" => []
}
Since you refactored Ruby code in a Markdown file, within this file, it's impossible to know that this code is valid. What tools can you use to verify your refactored code is valid, working, Ruby code? Use that tool to verify before submitting this work. I copy/past the code in an IRB session. I ran .keys and .values for foods, person, post, post2.