"check_oppai"ã¨ããååã使ããããªã
"A doctor is checking oppai."
åãã¡ã³ãã¼ã«ã¯ã"check" ããä½ãããããããªããã使ããªãã§ãã¨ã¡ããã¡ããè¨ã£ã¦ããæ°ãããã®ã§èããªããã¦ã¿ãã
"check" ã使ã£ã¦ã»ãããªãçç±ã¯2ã¤ã
- ãä½ãããã§ãã¯ããã®ããããã¥ãã
- ãã©ãããã§ãã¯ããããããã¥ããï¼ç ´å£çãéç ´å£çãï¼
- ãã§ãã¯ãããçµæããã©ãè¿ãã®ãããããªã
1ã¤ç®2ã¤ç®ã«ã¤ãã¦ã¯ãªã³ã¯å
ã§ãæ¸ãã¦ããããããã«ã¤ãã¦ã¯ã¡ã½ããåã«å¯¾è±¡ãå
¥ãã¦ããã°ä½ãã©ããã§ãã¯ãããã¯ããç¨åº¦ããããä¾ãã°ãã¢ã«ã¦ã³ãæ
å ±ã«ä½¿ããã¦ããã¡ã¼ã«ã¢ãã¬ã¹ãéè¤ããªãã調ã¹ããå ´åã«
Account#check_email_duplicate
ã®ãããªååãä»ãããããããªãã
ãããã3ã¤ç®ã«ã¤ãã¦ã¯ã©ãã ããããã§ãã¯ããçµæãã©ãè¿ãã¹ããï¼ã©ãè¿ããããã¨ãæ³å®ãã¹ãããåã«ã¯ããããªãã
ããã§ãæåã®ç»åã«è©±ãæ»ããè±è¾é㧠"check" ã¨ããåèªã調ã¹ã*1æã«ãä¸è¨ã®ãããªä¾æãåºã¦ããã
ããã®ç¶æ ãªã©ããæ¤æ»ããããã§ãã¯ãã
ã»Have a doctor check your breasts once a year. : å¹´ã«ä¸åº¦ãå»å¸«ã«ããä¹³æ¿ã®æ¤è¨ºãåãã¦ãã ããã
ãã®å ´é¢ã§ãå»å¸«ãã¯ã©ã¦ãã£ã¢ããã«è¿ãã¹ãè¿çããã"check_oppai_health" ã¡ã½ãããè¿ãã¹ãå¤ãã§ããã
- return 9; // 10ç¹ä¸9ç¹ã§ãã
- return true; // nice oppai
- throw new BreastCancerException(); // ä¹³ãããè¦ã¤ããã¾ãã
- return ERROR_BREAST_CANCER; // ä¹³ãããè¦ã¤ããã¾ãã
- // è¿çãªãï¼ä½ãåé¡ããã¾ããã§ããï¼
ããããã©ãããããããã¿ã¼ã³ã§ãã©ããééãã§ã¯ãªããã§ãããããã«ã"check_oppai_health" ã¨ããã¡ã½ãããè¦ãä»äººã¯è¿ãå¤ã«ä½ãè¿ã£ã¦ãããæ³åãã¤ããªãã
ãããä¸è¨ã®ãããªè¿ãå¤ãè¿ãã®ã§ããã°ãããããä¸ã®ãããªã¡ã½ããåã«ããã»ããè¯ããããããªãã
- score_oppai_health
- has_healthy_oppai
- assert_healthy_oppai
- detect_oppai_error
è¿ãå¤ã2å¤ãªã®ã§ããã°ãis, has ã¨ãã£ã boolean ã§ãããã¨ãæãããªæ¥é è¾ãä»ããããã¾ããä¸åæ ¼æã«ä¾å¤ãé£ã°ãã®ã§ããã°ãä¿è¨¼ããå 容㧠assert(validate) ãããã診æçµæãã¨ã©ã¼ã³ã¼ãã¨ããå½¢ã§è¿ãå ´åã¯é£ããã®ã§ãããä¾ãããã°æãã¦æ¬²ããã
ããããå¤ãã®å ´åããæ¤æ»ãããã¨ããæå³ã® "check_xxx" ã¯ä¸è¨ã®ãããªæ £ç¿ã«å£ã£ãå¥ã®ååã«ç½®ãæããããã¯ãã§ãå®æã« "check" ã使ãã®ã¯éé¿è¡åã ã¨èªèããã»ãããããããã"check" ã¨ããåèªã使ããããå¾ãªããããªå¦çãè¡ãªãã®ã§ããã°ããã®ã¡ã½ããã®è²¬ä»»ã®åå²ããèããªãããã»ããè¯ããããããªãã
è¿ãå¤ãã¾ã
- // è¿çãªãï¼ãã£ã±ãã«ãã§ãã¯ãã¼ã¯ãã¤ããï¼
ãããã "check" ã®æå³ãå¥ã®æå³ã§æãã¦ããå ´åã¯ãããªå¦çãè¡ããããããããªãããã¼ã¯ã·ã¼ãã対象㫠"check" ã¨ããåèªã使ã£ããããã¨ãããããåéããçã¾ããå ´åãããã