32nd Diary

トップ | 最新 | 過去の日記 | もっと過去の日記

2010年
12月
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
めーるあどれす
ruby -rbase64 -e'puts Base64.decode64 %q(dGFrYW5vMzJAZ21haWwuY29t)'



2010-12-09 (Thursday) [長年日記]

[Ruby] How to make your iterator

Ruby is a simple and powerful programming language. And users can reflect their own concept to Ruby script easily.

For example, you wanna make special iterator, Ruby lets you do it, of course.

Above class, IntegerArray, has each_odd method. This method provides iterator for each odd number.

How easy making custom method is. Ruby Advent Calendar jp-en: 2010

This entry is for Ruby Advent Calendar jp-en: 2010. The previous post was from ser1zw and the next post will be from technohippy. He is good at Google Wave and so on. Im looking forward to his entry.

https://atnd.org/events/10439

http://ser1zw.hatenablog.com/entry/20101208/1291816370

http://d.hatena.ne.jp/technohippy/

本日のPingbacks(全0件)