Add documentation for attach method.