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

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -