I have two files, one with module ToMix:
module ToMix
    @module_var = "modulevar"
    def self.mix_function
        puts "mix_function SELF: #{@module_var}"
    end
    def mix_function
        puts "mix_function: #{@module_var}"
    end     
    class MixClass
        attr_accessor :mixclassvar
        def initialize(value)
            @mixclassvar = value
        end
    end
end
which I want to mixin to the class TestInclude in the other file:
class TestInclude
    require "ToMixFile"
    include ToMix
end
Could someone explain why the instance variable @module_var and methods self.mix_function, mix_function are undefined? And how would I define them?
t2 = TestInclude.new()
t2.mix_function                           # => error undefined (exected call to mix_function)
t2.module_var = "test set module_var"     # => error undefined
TestInclude.mix_function                  # => error undefined (expected call to self.mix_function)
TestInclude.method_defined? :mix_function # => false