Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #4772

Re: Using "class Object" for a project

X-FeedAbuse http://nntpfeed.proxad.net/abuse.pl feeded by 88.191.16.109
Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!nospam.fr.eu.org!talisker.lacave.net!lacave.net!not-for-mail
From Joel VanderWerf <joelvanderwerf@gmail.com>
Newsgroups comp.lang.ruby
Subject Re: Using "class Object" for a project
Date Thu, 19 May 2011 12:58:14 -0500
Organization Service de news de lacave.net
Lines 25
Message-ID <4DD55A31.4070205@gmail.com> (permalink)
References <a758af90f801ff5df85c80e0f184f560@ruby-forum.com>
NNTP-Posting-Host bristol.highgroove.com
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-Trace talisker.lacave.net 1305829738 45344 65.111.164.187 (19 May 2011 18:28:58 GMT)
X-Complaints-To abuse@lacave.net
NNTP-Posting-Date Thu, 19 May 2011 18:28:58 +0000 (UTC)
In-Reply-To <a758af90f801ff5df85c80e0f184f560@ruby-forum.com>
X-Received-From This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway
X-Mail-Count 383483
X-Ml-Name ruby-talk
X-Rubymirror Yes
X-Ruby-Talk <4DD55A31.4070205@gmail.com>
Xref x330-a1.tempe.blueboxinc.net comp.lang.ruby:4772

Show key headers only | View raw


On 05/19/2011 10:21 AM, Markus H. wrote:
> - Is there any way to use a class name like "Object" on a per-project
> base?

Put it in a module?

module MyMUD
   class Object
   end

   p Object
   p ::Object

   class Foo < Object; end
   p Foo.ancestors
end

__END__

Output:

MyMUD::Object
Object
[MyMUD::Foo, MyMUD::Object, Object, Kernel]

Back to comp.lang.ruby | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Using "class Object" for a project "Markus H." <shevegen@gmail.com> - 2011-05-19 12:21 -0500
  Re: Using "class Object" for a project Joel VanderWerf <joelvanderwerf@gmail.com> - 2011-05-19 12:58 -0500
  Re: Using "class Object" for a project 7stud -- <bbxx789_05ss@yahoo.com> - 2011-05-19 12:37 -0500
  Re: Using "class Object" for a project Robert Dober <robert.dober@gmail.com> - 2011-05-19 13:50 -0500
    Re: Using "class Object" for a project Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-05-19 15:05 -0500

csiph-web