Created
February 10, 2017 21:08
-
-
Save Supernats/fdfa7db3cd4119df13c3b10f564ac73c 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
def skills_in_roster(roster) | |
skills = roster.map { |_, skills_array| skills_array }.flatten.uniq | |
end | |
def developers_with_skill(skill, roster) | |
roster.select do |developer, developer_skills| | |
developer_skills.include?(skill) | |
end. | |
keys.map(&:to_s) | |
end | |
def skill_map(roster) | |
Hash[ | |
skills_in_roster(roster).map do |skill| | |
[skill, developers_with_skill(skill, roster)] | |
end | |
] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment