Can anyone help me to understand the below 3 methods about their
functional differences and uses?
Module#included
Module#extended
Module#prepended
Thanks
···
--
Posted via http://www.ruby-forum.com/.
Can anyone help me to understand the below 3 methods about their
functional differences and uses?
Module#included
Module#extended
Module#prepended
Thanks
--
Posted via http://www.ruby-forum.com/.
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.***
--
Posted via http://www.ruby-forum.com/.
@Hans Module#extended not documented -
http://www.ruby-doc.org/core-2.0/Module.html#method-i-extended
And in my console `ri` doesn't work. I don't know why.
C:\>ri prepended
Nothing known about .prepended
C:\>ri extended
Nothing known about extended
--
Posted via http://www.ruby-forum.com/.
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?
--
Posted via http://www.ruby-forum.com/\.
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.
Love U Ruby <mailto:lists@ruby-forum.com>
March 13, 2013 9:05 AM
@Hans Module#extended not documented -
Class: Module (Ruby 2.0.0)And in my console `ri` doesn't work. I don't know why.
C:\>ri prepended
Nothing known about .prependedC:\>ri extended
Nothing known about extendedLove U Ruby <mailto:lists@ruby-forum.com>
March 13, 2013 8:23 AM
Can anyone help me to understand the below 3 methods about their
functional differences and uses?Module#included
Module#extended
Module#prepended
Thanks
--
D. Deryl Downey
"The bug which you would fright me with I seek" - William Shakespeare - The Winter's Tale, Act III, Scene II - A court of Justice.
Maybe because DL is deprecated?
John
On Wed, Mar 13, 2013 at 11:46 AM, Love U Ruby <lists@ruby-forum.com> wrote:
Today I just installed. ruby 2.0 windows version
but i am getting something different with itC:\>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?