class Bio::MAF::Filters
Constants
- FILTER_CLASSES
Public Class Methods
build(spec, idx)
click to toggle source
# File lib/bio/maf/index.rb, line 935 def self.build(spec, idx) l = spec.collect do |key, val| if FILTER_CLASSES.has_key? key FILTER_CLASSES[key].new(val, idx) else raise "Unsupported filter key #{key}!" end end return Filters.new(l) end
new(l)
click to toggle source
# File lib/bio/maf/index.rb, line 946 def initialize(l) @l = l end
Public Instance Methods
empty?()
click to toggle source
# File lib/bio/maf/index.rb, line 950 def empty? @l.empty? end
match(entry)
click to toggle source
# File lib/bio/maf/index.rb, line 954 def match(entry) return ! @l.find { |f| ! f.call(entry) } end