Include vs extend

Can any one give simple definition for include and extend since iam
stumbled over the examples in the net

Aren’t they the same thing?

On Dec 18, 2007 5:10 PM, Ayyanar from Aspire Systems <
[email protected]> wrote:

Can any one give simple definition for include and extend since iam
stumbled over the examples in the net

Posted via http://www.ruby-forum.com/.


Ryan B.
http://www.frozenplague.net

No Ryan, it is not same. I think extend will allow the access to the
class methods of the extended module

On 18 Dec 2007, at 07:05, Ayyanar from Aspire Systems wrote:

No Ryan, it is not same. I think extend will allow the access to the
class methods of the extended module

Have a look at
http://macournoyer.wordpress.com/2007/07/06/extending-your-include-knowledge-of-ruby/
(this is a ruby rather than a rails question, so consider posting this
sort of thing to the ruby-talk mailing list)

Fred

I have created a screencast for this :
http://www.zepho.com/download/IncludeExtend.mov.zip
Enjoy!

On Dec 17, 2007 10:40 PM, Ayyanar from Aspire Systems <

I have put in different cases together.

http://www.neeraj.name/503/include-extend-module_eval-class_eval

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs