Skip to content

Instantly share code, notes, and snippets.

@RMcNeely
Created March 12, 2016 20:49
Show Gist options
  • Save RMcNeely/efed558737e210daa5b5 to your computer and use it in GitHub Desktop.
Save RMcNeely/efed558737e210daa5b5 to your computer and use it in GitHub Desktop.
def find_the_cheese(array)
cheese_types = ["cheddar", "gouda", "camembert"]
new_array = []
if array.include?(cheese_types)
return new_array << array
else return nil
end
new_array
end
cheese_types = ["cheddar", "gouda", "camembert"]
check_cheese.map! {|check| cheese_types.include?(check)}
check_cheese.detect do |boolean|
if boolean == true
"#{boolean}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment