Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'pp'
- hash = Hash.new {|h, k| h[k] = [] }
- hash[class_name].push name: 'Penny', age: 26
- hash[class_name].push name: 'Leonard', age: 28
- hash[class_name].push name: 'Sheldon', age: 39
- pp hash
Advertisement
Add Comment
Please, Sign In to add comment