Guest User

Untitled

a guest
Jun 1st, 2013
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. require 'pp'
  2. hash = Hash.new {|h, k| h[k] = [] }
  3.  
  4. hash[class_name].push name: 'Penny', age: 26
  5. hash[class_name].push name: 'Leonard', age: 28
  6. hash[class_name].push name: 'Sheldon', age: 39
  7.  
  8. pp hash
Advertisement
Add Comment
Please, Sign In to add comment