Classes are just constants.

def lol_factory(klass)
  klass.new
end

my_string = lol_factory(String)