4 ms·
yes, ruby has a splat * operator that will basically expand an array into a set of arguments. array = ["https://news.ycombinator.com/news", "https://news.y
by fouc 7y ago
yes, ruby has a splat * operator that will basically expand an array into a set of arguments.
array = ["https://news.ycombinator.com/news", "https://news.ycombinator.com/news?p=2", "https://news.ycombinator.com/news?p=3"]
page1, page2, page3 = HTTPX.get(*array)
- stormbrew 7y agoNote you can also splat the return as well: *pages = HTTPX.get(*urls)