I have a class something like below, and I used instance variables (array) to avoid using lots of method parameters.
It works as I expected but is that a good pract
Those are class instance variables and are a perfectly legitimate things in ruby: classes are objects too (instances of Class) and so have instance variables.
One thing to look out for is that each subclass will have its own set of class instance variables (after all these are different objects): If you subclassed DummyClass, class methods on the subclass would not be able to see @arr.
Class variables (@@foo) are of course the other way round: the entire class hierarchy shares the same class variables.