How can I pass a an array of strings as attributes when creating new instance of a class? Say I want to do something like this:
Person.new(person_attrs) #<= Wrong number of arguments. Expected 3, got 1
['foo', 'bar', 'baz']
It's expecting a hash when setting the attributes to an object. You are getting the
Wrong number of arguments. Expected 3, got 1 error because it thinks the array as a whole is one argument (it does not care about it's contents).