I found examples of a mixin that makes assumptions about what instance variables an including class has. Something like this:
@val_one + @val_two
attr_accessor :val_one, :val_two
It is not a problem at all to assume in a module some properties about the class that includes/prepends it. That is usually done. In fact, the
Enumerable module assumes that a class that includes/prepends it has a
each method, and has many methods that depend on it. Likewise, the
Comparable module assumes that the including/prepending class has
<=>. I cannot immediately come up with an example of an instance variable, but there is not a crucial difference between methods and instance variables regarding this point; the same should be said about instance variables.
Disadvantage of passing arguments without using instance variable is that your method call will be verbose and less flexible.