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
I typically do something like this:
class A def a puts "hi" end def createB B.new self end class B def initialize(parent) @parent=parent end def b @parent.a end end end A.new.createB.b