Created
March 14, 2017 03:53
-
-
Save itzsaga/0783e92ef90fc337260e3df4838ba283 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 all_holidays_with_bbq(holiday_hash) | |
holiday_hash.map do |season, holidays| | |
holidays.map do |holiday_name, supplies | |
supplies.include?("BBQ") ? holiday_name : nil | |
end | |
end.flatten.compact | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment