You could cheat and simply add ...
_className : 'Car';
to the class.
On 06/02/2008, Herr Ernst <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I have a question.
> How is it possible in Prototype to determine the class of an object
> (i.e. constructor).
> Example:
> I define a class:
> "Car=Class.create({})"
> Then I instantiate it:
> "benz=new Car()"
>
> So and now I want to know what class benz is. I know I can do "benz
> instanceof Car" which returns true. But how can I get the class
> directly (I have many classes and don't want to compare every object
> with every class)?
>
> Thanks.
>
> >
>
--
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---