{"categories":["ruby"],"url":"https://dharry.hatenablog.com/entry/20090604/1244050159","blog_url":"https://dharry.hatenablog.com/","type":"rich","blog_title":"harry\u2019s memorandum","title":" ruby\u3067\u30d7\u30ed\u30b0\u30ec\u30b9\u30d0\u30fc\u306e\u5099\u5fd8\u9332","provider_name":"Hatena Blog","height":"190","width":"100%","author_url":"https://blog.hatena.ne.jp/dharry/","published":"2009-06-04 02:29:19","image_url":null,"author_name":"dharry","version":"1.0","description":"\u524d\u306bid:kenkitii\u3055\u3093\u3068\u30d7\u30ed\u30b0\u30ec\u30b9\u30d0\u30fc\u3067\u76db\u308a\u4e0a\u304c\u3063\u305f\u306e\u3067\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u5099\u5fd8\u9332\u3002\u7c21\u5358\u306a\u30b5\u30f3\u30d7\u30eb\u3002 #!/usr/bin/ruby class Progress def initialize(word = \".\") @cnt = 0 @space = \" \" @word = word end def bar(interval = 0.05) sleep interval @cnt += 1 STDERR.print(\"\\r#{@word*@cnt}\\r\") end def clear cnt = @cnt * @word.size STDERR.print(\"\\r#{@space*cnt}\u2026","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdharry.hatenablog.com%2Fentry%2F20090604%2F1244050159\" title=\" ruby\u3067\u30d7\u30ed\u30b0\u30ec\u30b9\u30d0\u30fc\u306e\u5099\u5fd8\u9332 - harry\u2019s memorandum\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}