Method: Bio::FlatFile::AutoDetect#autodetect

Defined in:
lib/bio/io/flatfile/autodetection.rb

#autodetect(text, meta = {}) ⇒ Object

Autodetect from the text. Returns a database class if succeeded. Returns nil if failed.



305
306
307
308
309
310
311
312
313
# File 'lib/bio/io/flatfile/autodetection.rb', line 305

def autodetect(text, meta = {})
  r = nil
  elements.each do |e|
    #$stderr.puts e.name
    r = e.guess(text, meta)
    break if r
  end
  r
end