Last active
December 24, 2015 12:59
-
-
Save samtalks/6801868 to your computer and use it in GitHub Desktop.
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
pigeons = [] | |
pigeon_list = {} | |
pigeon_data.each {|properties, properties_hash| pigeon_data[properties]. | |
each {|property, birds| pigeons += birds}} | |
pigeons.uniq! | |
pigeons.each do |pigeon| | |
pigeon_list[pigeon] = {:color => [], :gender => "", :lives => ""} | |
pigeon_data.each do |properties,properties_hash| | |
pigeon_data[properties].each do |property, birds| | |
pigeon_list[pigeon][properties] << property.to_s if birds.include?(pigeon) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment