Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hash = {
- key1: ['element1', 'element2', 'element3',]
- key2: ['element1', 'element2', 'element3',]
- ...
- }
- input = gets.chomp.downcase
- examples.each do |key, value|
- if key.to_s.include?(input)
- puts examples[key]
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment