def class A def a raise \"hi\" #can\'t be reached end class B def b a() #doesn\'t find method a. end end end
I want to invok
Was a supposed to be a class method for class A?
a
A
class A def self.a raise "hi" end class B def b A::a end end end A::B.new.b
If you want to keep it as an instance method, you'll obviously have call to it on an instance, like for example A.new.a.
A.new.a