"Florian Gross" <flgr / ccan.de> wrote in message
news:33vlj3F45i5rjU1 / individual.net...
> itsme213 wrote:
>
> >>>other method and parameter meta-data
> >>I don't think there's more meta-data than the above.
> >
> > Not built into Ruby, true. But an app might have its own meta-data,
possibly
> > domain-specific. Perhaps things like param types, or data about how
> > parameters are interpreted by a method (e.g. "either a list of dates, or
a
> > start date and a list of durations "), etc. A domain-specific Ruby could
add
> > Class#methods to declare such things.
>
> I think that's outside the scope of the above request.
>
> That aside I think custom meta-data should be implemented via custom
> methods on method objects. This would be easier if method objects were
> to be cached by Ruby.

My other post in this thread suggests that something like a MethodData
(perhaps better called MethodSignature, or MethodInfo) object, perhaps
combined with a Parameter object, helps as well. We need the same structure
of information from Method, UnboundMethod, Class#instance_methods,
Object#public_methods, etc.

And yes, these could probably be computed from the node tree when required.
It would be nice if they were 'stable' objects, so we could reliably attach
further information to them once Ruby decided to compute and create them.