2 ms·
The Ruby counter-example would be even better if it used `Struct` instead of a bare Class: https://ruby-doc.org/core/Struct.html https://ruby-doc.org/core/Struc
by Lammy 5y ago
The Ruby counter-example would be even better if it used `Struct` instead of a bare Class: https://ruby-doc.org/core/Struct.html https://ruby-doc.org/core/Struct.html
e.g.
User = Struct.new(:email, :first_name, :last_name)
or to specify them in any order via kw args:
User = Struct.new(:email, :first_name, :last_name, keyword_init=true)