ð¥ Railsãã¥ãŒããªã¢ã«è§£èª¬åç»ã®èŠã©ãã(第ïŒç« )
Railsãã¥ãŒããªã¢ã«è§£èª¬åç»ãããããã®è§£èª¬ç®æããå³éžïŒ
ä»åã¯ã第ïŒç« ãã§ãðãã®ç« ã§ã¯ããŸããŸãïŒç« å䜿ã£ãŠ Ruby ã«ã€ããŠãã£ããåŠãã§ãããŸãðšâð«ãããªç¬¬ïŒç« ã®è§£èª¬åç»ã®äžããé¢çœãéšåãããã¯ã¢ããããŠçŽ¹ä»ããŠãããŸãðž
" ãš ' ã®éãã£ãŠãªãã ãã
åç·šã®ãã£ãã¿ãŒ6ãpryã«ã€ããŠããã§ã¯ãæååããã£ã€ããæ¹æ³ã2çš®é¡çŽ¹ä»ãããã®ã§ãããåŒå±éã䜿ããšã³ã³ãã¥ãŒã¿ã«ãšã£ãŠã©ãå¬ããã®ãã®è§£èª¬ããããŸãã
åç·šãã£ãã¿ãŒ8ã " ãš ' ã®éããã§ã¯ããã®éããçãããŠã©ã®ããã«æŽ»çšããã®ããšãã話ãåèã«ãªããŸãã
Ruby ã®ç¹åŸŽ
Ruby ãšããèšèªã®ç¹åŸŽã«ã€ããŠåããããã説æãããŠããã®ããåç·šãã£ãã¿ãŒ9ãRubyã®ç¹åŸŽããã解説ãèãé²ããŠãããšåãããŸãã
解説äžã®ã人éã«å¯ãæ·»ã£ãèšèªãã«ãªã£ãŠãããšããã®ããå®éã«ã³ãŒããèŠãªããç解ã§ãããšæããŸããPythonãšã®ç¹åŸŽã®éãã®è©±ãé¢çœãã§ãã
ã·ã³ãã«(:)ã䜿ãçç±
æ°å€ããæååããã·ã³ãã«ã«ã¯ã©ã®ãããªéããããããªãã·ã³ãã«ãç©æ¥µçã«äœ¿ãã¹ããªã®ããåããã®ããåŸç·šã®ãã£ãã¿ãŒ7ãã·ã³ãã«ã䜿ãçç±ãã§ãã
ããããã® object_id ãåºããŠãã£ãŠãç¹åŸŽãå®éã«èŠãªããç解ããŠããããšãã§ããŸãããããåãããšãé¢çœãã§ãïŒ
ã¯ã©ã¹éå±€ã«ã€ããŠ
ã¯ã©ã¹ã«ã€ããŠã¯ä»ã®èšèªã«ãåãæŠå¿µããããŸããããã®è§£èª¬åç»ã§ã¯ Ruby ã£ãœãéšåã«ãã©ãŒã«ã¹ãåœãŠãŠè§£èª¬ããŠãããŠããŸãã
å šãŠã®ãã®ããªããžã§ã¯ããšããã®ãå§ãã¯ãªããªãç解ãã¥ãããããããŸãããã解説åç»ã®ã¿ãŒããã«ã®ã³ãŒããèŠãªããã¯ã©ã¹æ§é ã«è§ŠããŠãããšå°ããã€åãã£ãŠãããšæããŸãð
ãŸãšã
第ïŒç« ã®çŽ¹ä»ããããã§ãããïŒ
Ruby ã«ã€ããŠã®ç¥èãã®ã¥ããšè©°ãŸã£ãŠããŸãããåŸç·šã®ãã£ãã¿ãŒ10ãã¯ã©ã¹ãšã³ã·ã¹ãã ãã®éšåã§ã¯ãRails ã®äœè
ãã(ããšããšä»ã®èšèªã䜿çšãããŠããæ¹)ã®ã€ã³ã¿ãã¥ãŒã®åŒçšãåºãŠããã®ã§ããããªã Ruby ãéžãã ã®ããšããåãã®åçããRuby ãšããèšèªã®æ¬è³ªãè¡šããŠãããªããšæããŸãããRuby ã«ã€ããŠããã®è§£èª¬åç»ã®ïŒç« ã§ãã£ããç解ããŠãããããšããã®å
ã®åŠç¿ããã£ãšæ¥œãããªãããšæããŸãã
Railsãã¥ãŒããªã¢ã« ãã¬ãžã³ð ã®ä»ã®èšäºããèªã¿ã«ãªãããæ¹ã»ãã©ããŒã¯ãã¡ããããé¡ãããŸãðð
æ°ã«ãªãç®æãããã°ã30åç¡æèŠèŽãããããŸãã®ã§ããã²æå¹æŽ»çšããŠããã ããã°ãšæããŸãðžð