ruby - How to use Domainatrix.parse("STRING").host from a string instead of static url -
i want use line of code in ruby:
domainatrix.parse("string").host
on "string" place, want use string contains multiple links. when insert string on place, error doesn't know .parse. when insert static url, works.
but how can use string in parse multiple links?
thanks!
result = [] urls.map |url| result << domainatrix.parse(url).host end
Comments
Post a Comment