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

'hasOwnProperty' in javascript -

c# - Update a combobox from a presenter (MVP) -

android - Unable to generate FCM token from dynamically instantiated Firebase -