Copy the block when add class method