This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes Ruby and the fly likes Dynamic method calls Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Languages » Ruby
Bookmark "Dynamic method calls" Watch "Dynamic method calls" New topic
Author

Dynamic method calls

Bill Reiflin
Greenhorn

Joined: Dec 08, 2009
Posts: 2
I have a small program that dynamically calls methods such as column_name= from a hash. Pretty straight forward, except for the = part. I could store the = in the hash, but is ugly and might not always be in the method name.

This is what I have done, but it feels wrong:



Comments?
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

That's pretty much it. I think I'd put that in Table's initializer though.


A good workman is known by his tools.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Dynamic method calls
 
It's not a secret anymore!