if (A instanceof Friend) { ... }

-Fred

On Thu, Jun 5, 2008 at 1:24 PM, Daniel Magliola <[EMAIL PROTECTED]> wrote:

>
> I have in my code several classes defined using prototype.
>
> var Conversation = Class.create({ (methods) });
> var Friend = Class.create({ (methods) });
>
> And I have a variable that can hold an instance of either of both
> classes.
>
> var A = new Friend();
>
> Is there a way of checking which type it is?


-- 
Science answers questions; philosophy questions answers.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to