how do you get the contents of test with the variable a?
Go read "The Ruby Way"
class A
attr_accessor :variable, :test
end
a = A.new
a.variable = :test
a.send a.variable if a.responds_to? a.variable
send is a method in class Object that takes a symbol and an argument
list. the symbol is used to call a method of a corresponding name which
is given the arguments.
Rails tends to use this in combination with method missing in active
record for its handling of database attributes which I assume is what
your referring to.