I want to build an address string so that my reports and screens that show addresses won't have empty lines or punctuation hanging out in the middle of nowhere (such as commas inbetween city and state - if there's no city or state, there's a blank line with a comma). I wrote this, but it seems too verbose for ruby. Is there a better way to write this?

Thank you!



def full_address
full_address = ''
full_address = Company.address_1 if Company.address_1

if Company.address_2.empty?
else
if full_address == ''
full_address = Company.address_2
else
full_address << 'linebreak' + Company.address_2
end
end

if Company.address_3.empty?
else
if full_address == ''
full_address = Company.address_3
else
full_address << 'linebreak' + Company.address_3
end
end

if Company.city.empty?
else
if full_address == ''
full_address = Company.city
else
full_address << 'linebreak' + Company.city
end
end

if Company.state.empty?
else
if full_address == ''
full_address = Company.state
else
if Company.city.empty?
full_address = full_address + 'linebreak' + Company.state
else
full_address << ', ' + Company.state
end
end
end

if Company.zip.empty?
else
if full_address == ''
full_address = Company.zip
else
full_address << ' ' + Company.zip
end
end

if Company.zip4.empty?
else
if full_address == ''
full_address = Company.zip4
else
if Company.zip.empty?
full_address << ' ' + Company.zip4
else
full_address << '-' + Company.zip4
end
end
end