I want to write a method that simplifies the names of corporations. I would like it to work as follows:
@clear_company = clear_company(@company.name)
What would happen is @company.name = "Company, Inc." @clear_company would be "Company"
If @company.name = "Company Corporation" @clear_company would be "Company"
There wouldn't be extra spaces. I looked at different strip and gsub, but I need to maintain an array:
clean_array = %w[Inc. Incorporated LLC]
I could update that to make it more effective.
How would I do this?