Feature request: Define Methods for Namespace::Class
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ActiveRDF |
Confirmed
|
Medium
|
Unassigned |
Bug Description
It would be very useful if a method could be defined for a Namespace::Class .
I am not sure if this a feature that should be implemented in ActiveRDF or in SWORD.
One possible usecase:
For a lot of data, not all reverse properties are present.
e.g. sioc::forum - sioc::container_of -> sioc::post,
but almost never sioc::post - sioc::has_container -> sioc::forum
Defining what to do if a property is not found in multiple places in the code is not DRY,
and gets boring after the third time :P
I would like to be able to write the following:
class SIOC::Post < RDFS::Resource
def has_container
return self.sioc:
end
end
this should work already: since it doesn't, it seems to be a bug