pyfixes/ancestor_name.rb
# Finds topmost module in which is this class contained
Finds topmost module in which is this class contained
Finds topmost module in which is this class contained
def find_topmost_module
    current = self
    topmost_module = nil
    while current = current.parent
      if current.is_a? ModuleOrPackageNode
        topmost_module = current
      end
    end
    return topmost_module
  end
def find_topmost_module current = self topmost_module = nil while current = current . parent if current . is_a? ModuleOrPackageNode topmost_module = current end end return topmost_module end
Finds topmost module in which is this class contained
Finds topmost module in which is this class contained