hash mapping in ruby