Google

def SourceFactory::create_from arg#, slurp=true if arg.kind_of? String source = Source.new(arg) elsif arg.kind_of? IO source = IOSource.new(arg) end source end