From: Robert Klemme Date: 2008-03-04T00:43:09+09:00 Subject: Re: Complete Serialization Options 2008/3/3, Demonic Software : > Is there a centralized structure that holds all the methods, instance > variables, and then all the ancestor methods, instance variables, etc. For > example, in Python there is self.__dict__, which is basically a hash table > and it holds all the basic structures that make up the object in question. You can access methods via #method etc. but you can never access method source code in Ruby so I doubt Ruby gives you what you need out of the box. But there are projects that will parse Ruby source or give you access to the parsed source (IIRC "parse tree" is one of them). > Now, I know this is not Python, but I was wondering if Ruby had a hash table > or similar object that holds this type of information. Also, is there > something (e.g. a manual, guide, paper ) that discusses the *under-the-hood* > layout and function of Ruby structures once they are created? I am trying > to understand what I can and can not do with the Ruby Language :) Thanks in > advance. That's probably a good question for ruby-core http://www.ruby-lang.org/en/community/mailing-lists/#ruby-core Also, information about how to code an extension will likely help you. Sorry, no URL handy here. And then there is of course the source code which seems quite readable. Kind regards robert -- use.inject do |as, often| as.you_can - without end