Google

def document return parent.document unless parent.nil? nil end