[Activerdf] How do I test for class?

Knud Hinnerk Möller knud.moeller at deri.org
Thu Oct 12 17:41:23 IST 2006


Hi,

Am 12.10.2006 um 17:30 schrieb Eyal Oren:

> abd shorter than instance_of? is by the way:
> a.is_a?  or
> a.kind_of?
>
> (first is an alias for instance_of, second also tests superclass
> membership, see ruby api for ore info; both should work in activerdf)

I'm not sure that is correct, it seems to be the other way around:

- if I use instance_of, I get all classes the receiver is an instance  
of (e.g. rdfs:Resource, eswc:PaperPresentation, eswc:TalkEvent, ...)
- however, if I use kind_of, I only get rdfs:Resource as a result.

Have fun in France and say hi to Renaud!

Knud


-------------------------------------------------
Knud Möller, MA
+353 - 91 - 495086
Digital Enterprise Research Institute
   National University of Ireland, Galway
Institiúid Taighde na Fiontraíochta Digití
   Ollscoil na hÉireann, Gaillimh


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.deri.org/pipermail/activerdf/attachments/20061012/6634f7be/attachment-0001.htm


More information about the Activerdf mailing list