From: Robert Klemme Date: 2009-11-06T19:08:45+09:00 Subject: Re: Executing one of several ruby objects 2009/11/5 Don French : > Ok, that gives me the list of the files. how do I execute a known > class method call it self.identify in each of them, these are all of > the same class. That is still the part I do not understand. I typically find it easier to use a registration process, e.g. in mod1.rb: class X def self.identify; "foo"; end end ::MODULES << X in mod2.rb: class Y def self.idenfity; "bar"; end end ::MODULES << Y main.rb: require 'set' MODULES = Set.new Dir["*.rb"].each {|f| load(f)} MODULES.each do |mod| mod.identify end Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/