Method: Nokogiri::CSS::XPathVisitor#visit_combinator

Defined in:
lib/nokogiri/css/xpath_visitor.rb

#visit_combinator(node) ⇒ Object



219
220
221
222
223
224
225
# File 'lib/nokogiri/css/xpath_visitor.rb', line 219

def visit_combinator(node)
  if is_of_type_pseudo_class?(node.value.last)
    "#{node.value.first&.accept(self)}][#{node.value.last.accept(self)}"
  else
    "#{node.value.first&.accept(self)} and #{node.value.last.accept(self)}"
  end
end