Difference of Module#included and Module#extended and Module#prepended

Can anyone help me to understand the below 3 methods about their
functional differences and uses?

Module#included

Module#extended

Module#prepended

Thanks

mod.included(other) is called after other.include(mod)
mod.extended(obj) is called after obj.extend(mod)
mod.prepended(other) is called after other.prepend(mod)

they are Hook or Callback methods.

AND YOU ARE TO LAZY TO USE RI!!

ri included

#=> Callback invoked whenever the receiver is included in another
module or class.

@Hans Module#extended not documented -

And in my console ri doesn’t work. I don’t know why. :frowning:

C:>ri prepended
Nothing known about .prepended

C:>ri extended
Nothing known about extended

Today I just installed. ruby 2.0 windows version
but i am getting something different with it

C:>irb --simple-prompt
DL is deprecated, please use Fiddle

p “hi”
“hi”
=> “hi”

Can anyone tell me why I am being said that to use fiddle?

On Wed, Mar 13, 2013 at 11:46 AM, Love U Ruby [email protected]
wrote:

Maybe because DL is deprecated?

John

Probably because if you’re using RVM, you didn’t run ‘rvm docs generate’
like the instructions dictate. Check whatever ruby manager or ruby
packages you’re using have to say about building the ri/rdoc docs.

C:>ri extended

Module#prepended

Thanks


D. Deryl D.

“The bug which you would fright me with I seek” - William Shakespeare

  • The Winter’s Tale, Act III, Scene II - A court of Justice.