Accessing Instance Variables from file

M

Mark cheng

How do I access all of the instance variables from a ruby file that has
classes in if I do know the class names, but I can store the class names
as class-type objects? Object.instance_variables only applies to various
methods (i tried on irb) and I cannot store method names as methods
types because that is not an object type. I was wondering if there was a
library to perform this function or should I just write my own to add to
the module class?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,208
Messages
2,571,082
Members
47,683
Latest member
AustinFairchild

Latest Threads

Top