If you wanted to to allow for users to search for recipes by his or her own query, here is a possible refactor:

(https://github.com/rest-client/rest-client)
```ruby
puts "Please enter a recipe keyword"
query = gets.chomp
# the rest-client gem lets us define URL parameters ("?query_parameter=value" part of a URL address) like so:
result = RestClient.get('http://food2fork.com/api/search', {params: {key: '9d48f93d5a41c6a2c3b0835dcbf30d42', q: query}})
```