News for hackers. Stuff that matters.
Re:How to Dynamically Create Instance Variables in Ruby by joshmcmillan on Friday July 28, 2023 @06:52AM (#36905119)
Ruby 3.2 has `Data.define`, which is an even better way of doing this: https://docs.ruby-lang.org/en/3.2/Data.html
Re:How to Dynamically Create Instance Variables in Ruby by psychoslave on Friday July 28, 2023 @07:50AM (#36905530)
Awesome, thanks for pointing it.
Re:How to Dynamically Create Instance Variables in Ruby by nerdponx on Friday July 28, 2023 @08:49AM (#36906054)
Nice, it's attrs/dataclass from Python.