FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
Architecture & Design
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
January 01, 2001

Programming in Ruby

(Page 9 of 11)
Jan01: Programming in Ruby


module Enumerable
  def find
    each {|val| return val if yield(val)} 
  end
end
class Array
  include Enumerable
end

Example 8: Adding functionality with a mix-in.

Previous Page | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 Next Page
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK