It really comes down to what the intended use of the class is, and whether the value should be instance dependent or not. There are valid use cases for each, it’s not really a use x over y type of situation.
In this case, if the goal is to just double a number, a class isn’t really needed in the first place as you could just do
my_num * 2. However for demo purposes, i could probably go with like
def self.double(value : Int32)
value * 2
The reasoning being the class is essentially just being used as a namespace, really a
module might be a better option for this case. Also depends on the context of how this class/object is being used.