Hi, I was wondering if it was possible to do something like the
following:

class A

def b
 stuff
end

def c
 stuff
end

def d(x)
 self.x
end
end

Then use thing.d(a) with thing an instance of A?
Basically, given a long list of methods belonging to a class, if you
wanted ruby to apply methods based on the state of the program, how
would you set it up besides doing:

case A
when b
 thing.stuff
when c
 thing.otherstuff
.
.
.
etc.

Thank you for any help with this:)

If ruby can't do this, are there any languages languages that can treat
methods as objects?
-- 
Posted via http://www.ruby-forum.com/.