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
JavaRanch » Java Forums » Languages » Ruby
Bookmark "Dynamic method calls" Watch "Dynamic method calls" New topic

Dynamic method calls

Bill Reiflin

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:

Marc Peabody
pie sneak

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.
I agree. Here's the link:
subject: Dynamic method calls
It's not a secret anymore!