Copy block when add method to class