refactor to make attr_wrappable and wrap_attribute private class methods