Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > extend self

Reply
Thread Tools

extend self

 
 
vruz
Guest
Posts: n/a
 
      08-28-2004
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 !



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing self: if self is a tree how to set to a different self Bart Kastermans Python 6 07-13-2008 11:19 AM
__autoinit__ (Was: Proposal: reducing self.x=x; self.y=y;self.z=z boilerplate code) falcon Python 0 07-31-2005 05:41 PM
Re: __autoinit__ (Was: Proposal: reducing self.x=x; self.y=y;self.z=z boilerplate code) Ralf W. Grosse-Kunstleve Python 2 07-12-2005 03:20 AM
Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code Ralf W. Grosse-Kunstleve Python 16 07-11-2005 09:28 PM
__autoinit__ (Was: Proposal: reducing self.x=x; self.y=y;self.z=z boilerplate code) Ralf W. Grosse-Kunstleve Python 18 07-11-2005 04:01 PM



Advertisments