Is there a cleaner way to do something like this?
%w[address city state postal country].map(&:to_sym) #=> [:address, :city, :state, :postal, :country] >
%i[ ] Non-interpolated Array of symbols, separated by whitespace (after Ruby 2.0)
%i[ ]
%I[ ] Interpolated Array of symbols, separated by whitespace (after Ruby 2.0)
%I[ ]
%i[address city state postal country]
the cleanest way to do this is:
%w[address city state postal country].map(&:to_sym)