Extract search input to Ruby Object