Method: Country::CLI#search_by_region
- Defined in:
- lib/Country/cli.rb
#search_by_region ⇒ Object
196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/Country/cli.rb', line 196 def search_by_region puts "Please enter the region: " input = gets.chomp countries = Country::COUNTRY.search_by_region(input) if countries.count > 0 countries.each do |country| country.info puts "\n" end else puts "Invalid region. Please enter a valid region." end end |