«« Next » « Previous
«« Next » « Previous

Link Details

DZone can't read your mind. Tell us what you like! Login and vote now.
Link 11369 thumbnail

By xelipe
via juixe.com
Published: Jan 18 2007 / 04:22

This article explains how to reopen a Ruby class so as to add new methods to the type. This is a way to extend a class' functionality without subclassing.
  • 13
  • 0
  • 960
  • 161

Comments

Add your comment
User 107114 avatar

daniel replied ago:

0 votes Vote down Vote up Reply

Um, duh? This is a pretty essential concept to Ruby and very commonly known. You might as well have written an article about how to create a main method in Java.

User 208653 avatar

elmo replied ago:

0 votes Vote down Vote up Reply

It seems helpful for rookie rubyists...

User 170421 avatar

mikestephen replied ago:

0 votes Vote down Vote up Reply

I don't agree Daniel, it may be an essential concept, but you could happily code Rails apps without knowing how this stuff works. I found it quite interesting, maybe 'cause I'm still a Ruby noob ;)

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.