At Sat, 15 Dec 2001 00:19:00 +0900,
nobu.nokada / softhome.net wrote:
> Where action_name is the class name and actions[action_name]
> means the library name to be loaded,

Sorry, it should be:

  require actions[action_name]
  mod = Object
  action_name.split("::").each do |name|
    mod = mod.const_get(name)
  end
  action = mod.new(request, response, session)


Or in 1.7.x:

  require actions[action_name]
  action = action_name.split("::").inject(Object) {|mod, name|
    mod.const_get(name)
  }.new(request, response, session)


...but eval'ing may be faster than above loops.


Nobu Nakada