The DataFilter class. A DataFilter is a wrapper around a block that can be run on a DataStream to process it. The block is supposed to return another DataStream object
# File lib/rbot/core/utils/filters.rb, line 40 def initialize(&block) raise "No block provided" unless block_given? @block = block end
# File lib/rbot/core/utils/filters.rb, line 45 def call(stream) @block.call(stream) end