Module: Nokogiri::Decorators::Hpricot::NodeSet
- Defined in:
- lib/nokogiri/decorators/hpricot/node_set.rb
Instance Method Summary collapse
Instance Method Details
#filter(rule) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/nokogiri/decorators/hpricot/node_set.rb', line 5 def filter rule ctx = CSS::Parser.parse(rule.to_s) visitor = CSS::XPathVisitor.new visitor.extend(Hpricot::XPathVisitor) search('.//self::' + visitor.accept(ctx.first)) end |