Skip to content

Instantly share code, notes, and snippets.

@onedebos
Last active March 30, 2020 12:22
Show Gist options
  • Save onedebos/96cf4bdc6035f21af39fbe8d0671a9d4 to your computer and use it in GitHub Desktop.
Save onedebos/96cf4bdc6035f21af39fbe8d0671a9d4 to your computer and use it in GitHub Desktop.
def find_country_by_name(country_to_find)
down_country = country_to_find.downcase
all_countries.select { |country| country[:name].downcase == down_country }
end
puts find_country("nigeria")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment