{"version":"1.0","provider_url":"https://hatena.blog","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/Pocket7878_dev/","blog_title":"Let's write \u03b2","title":"Ruby\u3067\u4e00\u6b21\u5143\u30aa\u30fc\u30c8\u30de\u30c8\u30f3 part 2 (\u753b\u50cf\u751f\u6210\uff09","blog_url":"https://tech-blog.pocket7878.com/","author_name":"Pocket7878_dev","type":"rich","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftech-blog.pocket7878.com%2Fentry%2F2012%2F09%2F28%2F170050\" title=\"Ruby\u3067\u4e00\u6b21\u5143\u30aa\u30fc\u30c8\u30de\u30c8\u30f3 part 2 (\u753b\u50cf\u751f\u6210\uff09 - Let&#39;s write \u03b2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":"http://cdn-ak.f.st-hatena.com/images/fotolife/P/Pocket7878_dev/20120928/20120928170033.png","categories":["Ruby"],"published":"2012-09-28 17:00:50","height":"190","url":"https://tech-blog.pocket7878.com/entry/2012/09/28/170050","description":"Cairo\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5229\u7528\u3057\u3066\u753b\u50cf\u3092\u51fa\u529b\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u307f\u307e\u3057\u305f\u3002 \u3082\u3046\u3059\u3053\u3057\u62bd\u8c61\u5316\u3057\u305f\u3044\u3067\u3059\u304c.. require 'cairo' class World def initialize(size) @map = Array.new(size, 0) @rule = Hash.new end def show @map.each do |cell| if cell == 0 print \" \" else print \"X\" end end puts end def cellNeighbors(idx) [ @map[idx-1], @map[idx], @map[(idx+1) % (@map\u2026","width":"100%"}