module Hpricot::Traverse

def self.filter(tok, &blk)

def self.filter(tok, &blk)
  define_method("filter[#{tok.is_a?(String) ? tok : tok.inspect}]", &blk)
end