Bio::FlatFile::AutoDetect::RuleRegexp
A autodetection rule to use more than two regular expressions. If given string matches one of the regular expressions, returns the database class.
Creates a new instance.
# File lib/bio/io/flatfile/autodetection.rb, line 180 def initialize(dbclass, *regexps) super(dbclass, nil) @regexps = regexps end
If given text matches one of the regexp, returns the database class. Otherwise, returns nil or false. meta is ignored.
# File lib/bio/io/flatfile/autodetection.rb, line 188 def guess(text, meta) @regexps.each do |re| return dbclass if re =~ text end nil end
[Validate]
Generated with the Darkfish Rdoc Generator 2.