resource introspection does not include virtual methods

Bug #48688 reported by Eyal Oren
4
Affects Status Importance Assigned to Milestone
ActiveRDF
Invalid
Wishlist
Unassigned

Bug Description

The introspection on Resource (e.g. methods, respond_to) only returns hard-coded methods (e.g. save, uri) but not the virtual methods from the dynamic attribute container.

Eyal Oren (ikbeneyal)
Changed in activerdf:
status: Unconfirmed → Confirmed
Revision history for this message
Eyal Oren (ikbeneyal) wrote :

wont fix, opinions in Ruby community is that introspection should only show 'real' methods, we have resource.direct_predicates anyway to find out which predicate lookups are supported.

Changed in activerdf:
status: Confirmed → Rejected
Revision history for this message
Rockwalrus (rockwalrus) wrote :

Are you sure that is the opinion of the Ruby community? All of the results on the first page of a Google search for "respond_to method_missing" that give an opinion on the issue say that respond_to? should always indicate whether method_missing is going to actually respond to that method name. For example, http://stackoverflow.com/questions/291132?sort=oldest

Furthermore, respond_to? is implemented by ActiveRecord now, and ActiveRDF is supposed to be like ActiveRecord. http://dev.rubyonrails.org/ticket/11538

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.