There is a method that looks like:
def some_thing(user)
x = user.age
y = user.height
end
I have an object that looks like:
x = other.info[0]
y = other.info[1]
How could I pass this information to the method some_thing?
some_thing(other)
won’t work as it doesn’t have the properties exposed in that manner.
Is it possible to do without modifying the classes and method parameters?
Create an anonymous
Structto create the properties and useArraysplat to fill them: