Google

def parent=( other ) return if @parent == other @parent.delete self if defined? @parent and @parent @parent = other end