This method is deprecated or moved on the latest stable version.
The last existing version (v4.1.8) is shown here.
next_element(element, name = nil)
public
Returns the next element after this one. Skips sibling text nodes.
With the name argument, returns the next element with that name,
skipping other sibling elements.
# File actionview/lib/action_view/vendor/html-scanner/html/selector.rb, line 495
def next_element(element, name = nil)
if siblings = element.parent.children
found = false
siblings.each do |node|
if node.equal?(element)
found = true
elsif found && node.tag?
return node if (name.nil? || node.name == name)
end
end
end
nil
end