Slides for RubyConf India 2014 talk "Ruby on Rails Hacking Guide" http://rubyconfindia.org/2014/
DevLOVE X Day1 C-5ã®ã»ãã·ã§ã³ã§ãã ITã®æ´»ç¨ç¯å²ã®åºããã¨ã¨ãã«ãè²»ç¨ã»å質ãããããªããªãåªå ããããã¸ã§ã¯ããå¢ãã¦ãã¾ããããããããã£ããèããããããä½ã£ã¦ãªãªã¼ã¹ãã¡ãããããæ£è§£ãªãã¦èª°ã«ãåãããªããã ãããã¨ãããã³ãã©ãå±ããªãããè¿æ¸è¦è¾¼ã¿ã®ç«ããªã大éã®æè¡çè² åµãæ±ããããããæåã®é¸æãªã®ããããå°ãã ãç«ã¡æ¢ã¾ã£ã¦èãã¦ã¿ã¾ããã? YAGNIã¨ããè¨èã便å©ã«ä½¿ãããã¦ã¯ãã¾ããã? ã³ã¼ããæ¸ããªããã®ã¨ãã¡ãã£ã¨èãã¦è¨è¨ãã¦ä½ãã®ã¨ã§ããããªã«éçºã¹ãã¼ãã«éããããã¾ãã? èãã¦ã¿ããã¨æãã¾ãã
ããã«ã¡ã¯ããããã ãã§ãã ããã³ãå´ãå®è£ ãã¦ããéã«ãµã¼ãã¼å´ã®APIãã¾ã ã§ãã¦ãªãã£ã¦ãã¨ã¯ãããããã¨æãã¾ãã ãããªæã« Rails ã§ç°¡åã«APIã®mockãã¤ãã£ã¦ãã¹ããã¦ã¿ã¾ãããã âç°å¢è¨å® ã¾ãã¯Rubyã¨Railsã®ç°å¢ãæ´ãã¾ãã 横ç°ããã®è¨äºãåèã«ãã¦ãã ããã MacBookAirã§RVM/Gemã使ã£ãRuby 1.9.2ãRails 3.1.0çã®ã¤ã³ã¹ãã¼ã« âããã¸ã§ã¯ãã®ä½æ ãã£ããããã¸ã§ã¯ããã¤ãã£ã¦ããã¾ãããã $ rails new xml-sample $ cd xml-sample ããã Rails ä¸ç¬ã§ã§ãã¾ããw âãã¼ã¿ã®ä½æ ã§ã¯æ¬¡ã«åå¾ãããã¼ã¿ãä½æãã¾ãããã ãµã³ãã«ã¨ãã¦ã¯ããã°ã®ããã«ã¿ã¤ãã«ã¨ã³ã³ãã³ããè¨å®ãã¾ãããã ã¿ã¤ãã«ã¯ string ã³ã³ãã³ã㯠text ã¨ãã¾ãã $ rails
Rails3ã¨Sinatra触ã£ã¦ã¿ããã®ã®Webã¢ããªãWebãµã¤ãããã¿ãæµ®ãã°ãªãã£ãã®ã§ã軽ãbotä½ã£ã¦ã¿ããã¨ã«ãã¾ããã ãã¿ æè¿ï¼é±éã®çµæ (æ¥æ¬å°æ£é£ç) http://www.shogi.or.jp/kisen/week/kekka.html å°æ£æ£æ¦ã®çµæãæ¥ã æ´æ°ãããã®ã§ãããããã¤ã¼ããã¾ããRSSã¨ããªãã®ã§ãããªãã«éè¦ããããã¨æãã¾ããã ä½æéç¨ ç´ äººã®è¦ãæ¸ããªã®ã§ãçªã£è¾¼ã¿ãªã©ããã°ãé¡ããã¾ãï¼ï¼ ã¹ã¯ã¬ã¤ãã³ã° ãªã«ã¯ã¨ãããã¾ãã¯ãããã Mechanizeã¨ããgemã§ã§ããããã åèï¼ã¯ã¦ãªãã¤ã¢ãªã¼ ã¹ã¯ã¬ã¤ãã³ã°ã ããªãä¸ã®Nokogiriã ãã§ãããã®ãã agent = Mechanize.new agent.get('http://www.shogi.or.jp/kisen/week/kekka.html') agent.
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}