- Define options for parallel call
- Yield api caller into the run method.
- Enjoy shotgun's unstoppable performance of retrieving data :)
- Use assembled result's array.
class << self
urls_to_be_fetched = [URI('http://example.com/index.html?count=10'),
data = run tasks: urls_to_be_fetched, threads: 6 do |uri|
## do everything you need with received data array