I’m quite new to ruby and was amazed by the powerful reflection
mechanism, so tried to use the tracing function to analyse the object
space of our project.
It was amazingly easy to dump module,class and method definitions to xml
as they occured, but i was not able to retrieve any information about
the formal method parameters (correct term?), neither the number nor the
name. I wasn’t able to retrieve information on instance variables as
well. Is it possible ?
If this kind of information retrieval is considered useful, I would also
suggest to add in-language comments as in python (especially if the irb
gets faster and more user friendly )
ad emacs) Fixnum character literals mess up brace matching ( ?( ,?) ),
but this could be hard to fix. Is there a syntax-highlighting patch ?
I’m quite new to ruby and was amazed by the powerful reflection
mechanism, so tried to use the tracing function to analyse the object
space of our project.
It was amazingly easy to dump module,class and method definitions to xml
as they occured, but i was not able to retrieve any information about
the formal method parameters (correct term?), neither the number nor the
name.
il Mon, 2 Feb 2004 15:00:41 +0900, Benedikt Huber benjovi@gmx.net ha
but i was not able to retrieve any information about
the formal method parameters (correct term?), neither the number nor the
name. I wasn’t able to retrieve information on instance variables as
well. Is it possible ?
arity() is your friend. About names: we’ll see keyword arguments in
ruby2
If this kind of information retrieval is considered useful, I would also
suggest to add in-language comments as in python (especially if the irb
gets faster and more user friendly )
probably yuo mean docstrings. I asked this once and matz answered that
this won’t make it in ruby. But you can use the MetaTags module for
this (yes, ruby is impressively flexible :).
Or, post an RCR on rcrchive.net
When Ruby supports keyword arguments, will the names of keyword method
parameters be included as part of the method selector (as done in
Smalltalk)? And will they be available at runtime to reflection?