class Bio::FlatFile::AutoDetect::RuleRegexp2
A autodetection rule to use more than two regular expressions. If given string matches one of the regular expressions, returns the database class.
Public Class Methods
Source
# File lib/bio/io/flatfile/autodetection.rb 180 def initialize(dbclass, *regexps) 181 super(dbclass, nil) 182 @regexps = regexps 183 end
Creates a new instance.
Calls superclass method
Bio::FlatFile::AutoDetect::RuleRegexp::new
Public Instance Methods
Source
# File lib/bio/io/flatfile/autodetection.rb 188 def guess(text, meta) 189 @regexps.each do |re| 190 return dbclass if re =~ text 191 end 192 nil 193 end
If given text matches one of the regexp, returns the database class. Otherwise, returns nil or false. meta is ignored.