Link Details

Link 65711 thumbnail
User 210342 avatar

By kaiwren
via blog.sidu.in
Published: Feb 13 2008 / 12:06

When working with Ruby, every once in a while you'll need to go and instantiate the appropriate classes when all you have is the names of those classes as Strings. If you're wondering when you'd ever need this, just try instantiating controllers at runtime based on the urls being requested. /project/info should instantiate ProjectController and invoke the method info() on it.
  • 10
  • 0
  • 983
  • 312

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (10)



Voters Against This Link (0)