refactor lib/utils/extract_urls.rb into a class