{"categories":["ruby"],"image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.basyura.org%2Fentry%2F20090602%2Fp1\" title=\" Enumerable - basyura&#39;s blog\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"basyura","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/basyura/","description":"\u30b3\u30fc\u30c9\u306e\u4e16\u754c\u3088\u308a\u3002 each \u30e1\u30bd\u30c3\u30c9\u3055\u3048\u5b9f\u88c5\u3057\u3066\u304a\u3051\u3070 Enumerable \u3092 include \u3059\u308b\u3053\u3068\u3067\u3044\u308d\u3044\u308d\u306a\u30e1\u30bd\u30c3\u30c9\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308b\u3002 class Test include Enumerable def each [1,2,3,4,5].each {|v| yield v } end end puts Test.new.map{|x| x * 2} #=> 2,4,6,8,10 puts Test.new.max #=> 5 puts Test.new.inject{|x,y| x + y} #=> 15","type":"rich","version":"1.0","provider_url":"https://hatena.blog","width":"100%","blog_title":"basyura's blog","blog_url":"https://blog.basyura.org/","published":"2009-06-02 00:00:00","url":"https://blog.basyura.org/entry/20090602/p1","title":" Enumerable","height":"190"}