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
You can use methods like parent, parent_name, parents to get outer modules, eg.:
parent
parent_name
parents
class A def self.a; puts 'a!' end class B def self.b; parent.a end end end A::B.b #=> a!