I have task here: I must create a class which will be like class Struct. I have just started to learn Ruby and don't know how to create it. In my attempts, I was able to create a method that takes arguments and creates an array. Then I have to go through the array and all of the arguments, make the argument class, in which I can bring some value. But I don't know how to create methods that can create classes in Ruby.
I am asking for help if you have an example or know where to find it, I will be grateful!
my attempts:
class Hobbit
def new(*params)
"#{params.inspect}"
end
end