From: Demonic Software Date: 2008-03-14T12:19:59+09:00 Subject: Naming ruby class attribute and methods ------=_Part_10174_14534415.1205464809681 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, Is there a way to name all the methods and attributes/ class instantiated variables that have been created? For example, from the class below, I would like to get all the variables instantiated from the initialize and example methods, and then I would also like to be able to get the method names. #pseudo code, not sure if it really runs class Foo def initialize() @thestring = '' @haha = "HA HA HAA!" @var = "I am a variable" end def example(arg) @arg = arg @thestring = "#{@haha} #{@var}: #{arg}" end def thestring @thestring end end So is there a way to extract ["thestring", "var", "haha", "arg"] for the variable names and then ["initialize", "example", "thestring"] for the method names. I can see how I would do it with regular expressions and ruby2ruby, but I was wondering if there was another way of extracting the information. Thanks in advance. ------=_Part_10174_14534415.1205464809681--