> now , i know that i can use "define_method" add a method
> dynamic, but i want to know how to add a "static method"
> dynamic ?

You can do this by using define_method in the context of the
singleton class of a class:

 class << aClass
   define_method .....
 end

In Ruby, we prefer to call this a "class method". We don't use
the term "static method".

gegroet,
Erik V. - http://www.erikveen.dds.nl/

----------------------------------------------------------------

 ##############################################################

 class Foo
   class << self
     define_method :one do
       1
     end
   end

   class << self
     self
   end.module_eval do
     define_method :two do
       2
     end
   end
 end

 ##############################################################

 class Bar
 end

 class << Bar
   define_method :one do
     1
   end
 end

 class << Bar
   self
 end.module_eval do
   define_method :two do
     2
   end
 end

 ##############################################################

 p Foo.one
 p Foo.two

 p Bar.one
 p Bar.two

 ##############################################################

----------------------------------------------------------------