Damin M. Gonzlez wrote in post #1076189:
>  Of course is better use attr_accessor but is just for understanding
> purpose.

Yes, those code snippets all do the same (the second one requires the class to already exist, however).

So there are obviously many ways to do the same thing in Ruby. :-)