# Main as Module

public

(Module.public_instance_methods - public_methods).each do |m|
  next if m == "initialize"
  next if m =~ /^\W+$/
  eval <<-END
    def self.#{m}( *args, &block )
      Object.class_eval do
        #{m}( *args, &block )
      end
    end
  END
end

private

(Module.private_instance_methods - private_methods).each do |m|
  next if m == "initialize"
  next if m =~ /^\W+$/
  eval <<-END
    def self.#{m}( *args, &block )
      Object.class_eval do
        #{m}( *args, &block )
      end
    end
  END
end

protected

(Module.protected_instance_methods - protected_methods).each do |m|
  next if m == "initialize"
  next if m =~ /^\W+$/
  eval <<-END
    def self.#{m}( *args, &block )
      Object.class_eval do
        #{m}( *args, &block )
      end
    end
  END
end

