instance method
next_selector
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v4.1.16Signature
next_selector(statement, values)
Called to create a dependent selector (sibling, descendant, etc). Passes the remainder of the statement that will be reduced to zero eventually, and array of substitution values.
This method is called from four places, so it helps to put it here for reuse. The only logic deals with the need to detect comma separators (alternate) and apply them to the selector group of the top selector.
Parameters
-
statementreq -
valuesreq
Source
# File actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb, line 800
def next_selector(statement, values)
second = Selector.new(statement, values)
# If there are alternate selectors, we group them in the top selector.
if alternates = second.instance_variable_get(:@alternates)
second.instance_variable_set(:@alternates, [])
@alternates.concat alternates
end
second
end
Defined in actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb line 800
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in HTML::Selector