xpath - Ruby string interpolation -


how insert

#{stock_sym} 

into

stock_price = dom.xpath('//*[@id="yfs_l84_aapl"]').first.content 

replacing aapl?

string interpolation works double quotes:

"//*[@id='yfs_l84_#{stock_sym}']" 

Comments