I hate to be super picky, but can you change this to

"#{ip_address.gsub('.','-')}.static.cloud-ips.com" if ip_address