Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news. Writing for Ruby Inside, I get to see a lot of Ruby code. Most is good, but sometimes we forget some of Ruby's shortcuts and tricks and reinvent the wheel instead. In this post I present 21 different Ruby "tricks," from those that most experienced developers use every day to the more obscure. Whatever your level, a refresh
ããã«ã¡ã¯ãTypePadã®QAãæ å½ãã¦ããå±±å£ã§ããä»åã¯Watirã使ã£ããã¹ãã®èªååã®è©±ãå°ããããã¨æãã¾ãã Watir = Web Application Test In Ruby Watirã¯Rubyä¸ã§åä½ããã¦ã§ãã¢ããªã±ã¼ã·ã§ã³åãã®ãã¹ãèªååãã¼ã«ã§ãããWeb Application Testing in Rubyãã®é åèªã§ãã¦ã©ã¼ã¿ã¼ï¼waterï¼ãã¨çºé³ãã¾ãã Watirã¯ãããªé¢¨ã«ä½¿ãã¾ãã require "watir" ie = Watir::IE.new ie.goto("http://memolog.org/") ã¨ãã£ã風ã«ä½¿ãã¾ããWatirã«çµã¿è¾¼ã¾ãã¦ããã¡ã½ãããå©ç¨ããã ãã§ç°¡åã«IEãæä½ãããã¨ãã§ãã¾ãããã®ä¾ã§ã¯ãIEãèªåçã«èµ·åãã¦ãhttp://memolog.org ã«ç§»åãã¾ãã Watir vs Seleniu
See related links to what you are looking for.
æ¬æ¸ã¯ãä»è¨èªã§ã®ããã°ã©ãã³ã°çµé¨ãæã¤äººã対象ã«ãRubyã®ç¹å¾´ãRubyãªãã§ã¯ã®æ¹æ³ãæ £ç¿ã«ã¤ãã¦è§£èª¬ãã¾ããããã¯Rubyã®è³æãèªãã§å®è·µçãªå¦ç¿ãé²ãã¦ããããã«å¿ è¦ãªåæç¥èã§ããæ¬æ¸ã¯Rubyã®åºç¤çãªé¨åã¨ã¡ã¿ã¯ã©ã¹ããããã¯æ§æã®ãããªç¬èªã®æ¦å¿µããããã«ã¾ã¤ããæåã説æããRubyç¹æã®èãæ¹ãç¥ã£ã¦ããããã¨ãç®çã¨ãã¦ãã¾ããæ¬æ¸ãæå¾ã¾ã§èªãã°ããRubyãªãã¡ã¬ã³ã¹ããã¥ã¢ã«ããèªå¨ã«èªã¿ããªãå¤æ§ãªRubyã©ã¤ãã©ãªãæ´»ç¨ãã¦ãèªåã§é«åº¦ãªRubyããã°ã©ãã³ã°ãç¿å¾ããã ãã®åºç¤ç¥èãæã«å ¥ãã§ããããRuby1.8åã³1.9ã«å¯¾å¿ãã¦ãã¾ãã æ¬æ¸ã¯ãO'Reilly Mediaçºè¡ãLearning Rubyãã®ç¿»è¨³æ¸ã§ã¯ãªããæ¥æ¬èªã«ããæ¸ãä¸ããã®æ¸ç±ã§ãã åºæ ã¯ããã« 1ç« ããããããRubyã®ããç活㸠1.1ãRubyã®ç¹å¾´ 1.1.
IS-A IS-A HAS-A - Raganwald IS-STRICTLY-EQUIVALENT-TO-A - Raganwald OOP ã«é¢ããæ¸ç±ãèªãã¨ï¼ããã¦ããç¶æ¿ã¯è»½ã ãã使ãã¹ãã§ã¯ãªããã¨ãããããªãã¨ãè¼ã£ã¦ããããç¶æ¿ã¯ IS-A ã®é¢ä¿ã«ã®ã¿ä½¿ãã¹ããã¨ãï¼ãå®è£ ã®å ±æã«ç¶æ¿ã使ã£ã¦ã¯ãªããªããã¨ãï¼ãç¶æ¿ãããåæã»å å«ãåªå ãã¹ããã¨ãâ¦â¦ã ããã Raganwald ã«è¨ãããã°ï¼ãIS-A ã®é¢ä¿ã¯ HAS-A ã®é¢ä¿ã¨åããã¨ãã¨ãï¼ãç¶æ¿ã¯ä¾¿å©æ©è½ã«éããªããã¨ãï¼ããªã¹ã³ãã®ç½®æååããçã¬ãããã¨ãããããªå³ããæè¦ã«ã¾ã§ãªãï¼ãããªé¢¨ã«è¨ãåã£ã¦ã¯ããªãããã©â¦â¦ã¾ãï¼ãã®ãããªãã¨ãä¸å¯§ã«èª¬ãã¦ããï¼ã ãã®ãããªï¼å¶éã®ç¡ãç¶æ¿ãç¦å¿ããæè¦ã¯ï¼ä¸è¬ã«ç´å¾ãããã¨ã®ã§ããå 容ã§ã¯ããããã ï¼ãããç¾å ´ã§é©ç¨ããã®ã¯ï¼é常ã«é£ãããã¨ã®ãã
ã¨ããããå³ã¯ãªãã¯ããã°æä½ããã¹ãã¡ãã¥ã¼ãåºã¦ã¦æ¥ãã¨ããã®ã¯æå¤ã¨ä¾¿å©ãªãã ãã©ããã³ã³ããã¹ãã¡ãã¥ã¼ãããã§ãã¦ãã¨ããã®ã¯Windowsã®ç¾ç¹ã®ã²ã¨ã¤ã ã¨æããããã¾ã©ãWindowsãªããã使ãã¡ãªããã¯ãªã«ã - çã®çå½ããå¼ç¨ã ããã®ã¨ããApple製åã®ãã¨ã°ããè¤ãã¦ããããä¸ã®ã¨ã³ããªã¼ãèªãã§æãåºããã®ããWindows95ã®ã¦ã¼ã¶ã¼ã¤ã³ã¿ã¼ãã§ã¤ã¹ãè¨è¨ãã¦ããããã®è©±ãããã¦ã¹ã®ãã¿ã³ã¯ä¸ã¤ãã«å¿ è¦ä»¥ä¸ã«ãã ããã¢ããã«ã«å¯¾ãã¦ãäºã¤ãããã¦ã¹ã®ãã¿ã³ãæ大ã«çãããã¦ã¼ã¶ã¼ã¤ã³ã¿ã¼ãã§ã¤ã¹ã®ä¸ç°ã¨ãã¦å¾¹åºçã«ãã ãã£ã¦ä½ã£ãã®ãããã®ã³ã³ããã¹ãã¡ãã¥ã¼ã ä»ããããããªçç±ã§ãã ãã ã«ãªã£ã¦ãã¾ã£ãããå½æã¯ãã·ã³ã°ã«ã¯ãªãã¯ã¯é¸æããããã«ã¯ãªãã¯ã¯ããã©ã¼ã«ãåä½ã®å®è¡ããå³ã¯ãªãã¯ã¯ã³ã³ããã¹ãã¡ãã¥ã¼ãã¨ãã大ååãOSã ãã§ãªããOffi
ã°ã¼ã°ã«ãã©ã®ããã«ã½ããã¦ã§ã¢éçºãè¡ã£ã¦ãããã¯ãããã¾ã§ãã¾ã詳細ãæããã«ããã¦ããªãã£ããã ãã°ã¼ã°ã«ã¯6æ10æ¥ãéçºè åãã¤ãã³ããGoogle Developer Day 2008 Japanããéå¬ããã°ã¼ã°ã«ã®ã½ããã¦ã§ã¢ã¨ã³ã¸ãã¢ãã°ã¼ã°ã«ã§ã®ä»äºè¡ãèªããGoogle ã½ããã¦ã§ã¢ã¨ã³ã¸ãã¢ã®æ¥å¸¸ãã¨ããè¬æ¼ä¼ãå®æ½ãããã¹ãã¼ã«ã¼ã¯ãNECã§ITã¨ã³ã¸ãã¢ã¨ãã¦å¤åããçµé¨ãããè¤å³¶åé æ°ã2006å¹´ããã°ã¼ã°ã«ã®ã½ããã¦ã§ã¢ã¨ã³ã¸ãã¢ã¨ãã¦åãã¦ãããè¤å³¶æ°ã¯ãã°ã¼ã°ã«ã§ã®ã½ããã¦ã§ã¢éçºæ¹æ³ã«ã¤ãã¦ãã°ã¼ã°ã«ã®ã«ã«ãã£ã¼ã¨èªèº«ã®è¦è§£ãç¹ã交ãã¦èªã£ãã ã°ã¼ã°ã« ã½ããã¦ã§ã¢ã¨ã³ã¸ãã¢ã®1æ¥ã®æµã è¤å³¶æ°ã®1æ¥ã¯ãæ10æããåºç¤¾ããã¡ã¼ã«ããã§ãã¯ãããã¨ããå§ã¾ãããã®æéã«ã¡ã¼ã«ãè¦ãçç±ã¯ãç±³å½ã«ããååã«é£çµ¡ãä»ããããæé帯ã ããã ã ååä¸ã®ä¸»ãª
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}