refactor inline_representer to support :inherit