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
Public Class Methods
new(&block)click to toggle source
# File lib/rbot/core/utils/filters.rb, line 40definitialize(&block)
raise"No block provided"unlessblock_given?@block = blockend
Public Instance Methods
call(stream)click to toggle source
# File lib/rbot/core/utils/filters.rb, line 45defcall(stream)
@block.call(stream)
end