extend self

Discussion in 'Ruby' started by vruz, Aug 28, 2004.

  1. vruz

    vruz Guest

    Florian Groß told me about a trick he uses in order to make module
    methods available to the outside world in a very easy way.

    foo not accessible from the outside world:
    module A; module B; def foo; "foo"; end; end; end;

    this makes it accesible, it communicates well and does
    the job perfectly well, a little gem:

    module A; module B; extend self; end; end;


    Now, will this still be available in Rite ?

    (I'm wondering about this because of the "selector namespaces" feature
    and some comments that have been made about "self")

    Thanks Florian for the tip.

    best,

    vruz

    (I hope I'm getting it right, if not then it's my fault and not Florian's ! :)
     
    vruz, Aug 28, 2004
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ralf W. Grosse-Kunstleve
    Replies:
    16
    Views:
    838
    Lonnie Princehouse
    Jul 11, 2005
  2. Ralf W. Grosse-Kunstleve
    Replies:
    18
    Views:
    949
    Bengt Richter
    Jul 11, 2005
  3. Ralf W. Grosse-Kunstleve
    Replies:
    2
    Views:
    668
    Dan Sommers
    Jul 12, 2005
  4. falcon
    Replies:
    0
    Views:
    577
    falcon
    Jul 31, 2005
  5. Bart Kastermans
    Replies:
    6
    Views:
    634
    Bart Kastermans
    Jul 13, 2008
  6. Replies:
    6
    Views:
    283
    Vivek
    Jan 25, 2006
  7. Jeff
    Replies:
    8
    Views:
    264
  8. Intransition
    Replies:
    1
    Views:
    232
    7stud --
    May 2, 2011
Loading...