How to call static/class method not defined in a class in ruby?
I have all in one file:-

    def foo(arg) 
     ...
    end

    class Ex

      def moo
        foo(self)
      end
    end 

But it will not call foo.  Instead it complains that it is invoking a private method.  What do I suffix foo with? I've read that all static methods are class methods but what is the implicit class for foo in this case?

I tried printing out self with 

    puts self

It reports main.  But if I put in main.foo(self), it still thinks I intend a private method.
How to call static/class method not defined in a class in ruby?
===

I have all in one file:-

    def foo(arg) 
     ...
    end

    class Ex

      def moo
        foo(self)
      end
    end 

But it will not call foo.  Instead it complains that it is invoking a private method.  What do I suffix foo with? I've read that all static methods are class methods but what is the implicit class for foo in this case?

I tried printing out self with 

    puts self

It reports main.  But if I put in main.foo(self), it still thinks I intend a private method.