sass-site/source/documentation/Sass/Selector/Sequence.html
2018-10-22 14:13:05 -07:00

1681 lines
68 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
Class: Sass::Selector::Sequence
&mdash; Documentation by YARD 0.9.12
</title>
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="../../../assets/css/docs.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
hasFrames = window.top.frames.main ? true : false;
relpath = '../../';
framesUrl = "../../frames.html#!Sass/Selector/Sequence.html";
</script>
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
</head>
<body>
<div id="header">
<div id="menu">
<a href="../../_index.html">Index (S)</a> &raquo;
<span class='title'><span class='object_link'><a href="../../Sass.html" title="Sass (module)">Sass</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Selector.html" title="Sass::Selector (module)">Selector</a></span></span>
&raquo;
<span class="title">Sequence</span>
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="../../class_list.html">
Class List
</a>
<a class="full_list_link" id="method_list_link"
href="../../method_list.html">
Method List
</a>
<a class="full_list_link" id="file_list_link"
href="../../file_list.html">
File List
</a>
</div>
<div class="clear"></div>
</div>
<iframe id="search_frame"></iframe>
<div id="content"><h1>Class: Sass::Selector::Sequence
</h1>
<dl class="box">
<dt class="r1">Inherits:</dt>
<dd class="r1">
<span class="inheritName"><span class='object_link'><a href="AbstractSequence.html" title="Sass::Selector::AbstractSequence (class)">AbstractSequence</a></span></span>
<ul class="fullTree">
<li>Object</li>
<li class="next"><span class='object_link'><a href="AbstractSequence.html" title="Sass::Selector::AbstractSequence (class)">AbstractSequence</a></span></li>
<li class="next">Sass::Selector::Sequence</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
<dt class="r2 last">Defined in:</dt>
<dd class="r2 last">.ruby-sass/lib/sass/selector/sequence.rb</dd>
</dl>
<div class="clear"></div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>An operator-separated sequence of <span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">simple selector sequences</a></span>.</p>
</div>
</div>
<div class="tags">
</div>
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#members-instance_method" title="#members (instance method)">#<strong>members</strong> &#x21d2; Array&lt;SimpleSequence, String|Array&lt;Sass::Tree::Node, String&gt;&gt; </a>
</span>
<span class="note title readonly">readonly</span>
<span class="summary_desc"><div class='inline'>
<p>The array of <span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">simple selector sequences</a></span>, operators, and
newlines.</p>
</div></span>
</li>
</ul>
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="AbstractSequence.html" title="Sass::Selector::AbstractSequence (class)">AbstractSequence</a></span></h3>
<p class="inherited"><span class='object_link'><a href="AbstractSequence.html#filename-instance_method" title="Sass::Selector::AbstractSequence#filename (method)">#filename</a></span>, <span class='object_link'><a href="AbstractSequence.html#line-instance_method" title="Sass::Selector::AbstractSequence#line (method)">#line</a></span></p>
<h2>
Instance Method Summary
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
</h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#add_sources!-instance_method" title="#add_sources! (instance method)">#<strong>add_sources!</strong>(sources) &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Add to the <span class='object_link'><a href="SimpleSequence.html#sources-instance_method" title="Sass::Selector::SimpleSequence#sources (method)">Sass::Selector::SimpleSequence#sources</a></span> sets of the child simple sequences.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#contains_parent_ref%3F-instance_method" title="#contains_parent_ref? (instance method)">#<strong>contains_parent_ref?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns whether there&#39;s a <span class='object_link'><a href="Parent.html" title="Sass::Selector::Parent (class)">Parent</a></span> selector anywhere in this sequence.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#do_extend-instance_method" title="#do_extend (instance method)">#<strong>do_extend</strong>(extends, parent_directives, replace, seen, original) &#x21d2; Array&lt;Sequence&gt; </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Non-destructively extends this selector with the extensions specified in a
hash (which should come from <span class='object_link'><a href="../Tree/Visitors/Cssize.html" title="Sass::Tree::Visitors::Cssize (class)">Tree::Visitors::Cssize</a></span>).</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#filename=-instance_method" title="#filename= (instance method)">#<strong>filename=</strong>(filename) &#x21d2; String<sup>?</sup> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Sets the name of the file in which this selector was declared, or `nil` if
it was not declared in a file (e.g. on stdin).</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(seqs_and_ops) &#x21d2; Sequence </a>
</span>
<span class="note title constructor">constructor</span>
<span class="summary_desc"><div class='inline'>
<p>A new instance of Sequence.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#inspect-instance_method" title="#inspect (instance method)">#<strong>inspect</strong> &#x21d2; String </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns a string representation of the sequence.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#line=-instance_method" title="#line= (instance method)">#<strong>line=</strong>(line) &#x21d2; Integer </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Sets the line of the Sass template on which this selector was declared.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#resolve_parent_refs-instance_method" title="#resolve_parent_refs (instance method)">#<strong>resolve_parent_refs</strong>(super_cseq, implicit_parent) &#x21d2; CommaSequence </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Resolves the <span class='object_link'><a href="Parent.html" title="Sass::Selector::Parent (class)">Parent</a></span> selectors within this selector by replacing them with
the given parent selector, handling commas appropriately.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#subjectless-instance_method" title="#subjectless (instance method)">#<strong>subjectless</strong> &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Converts the subject operator “!”, if it exists, into a “:has()” selector.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#superselector%3F-instance_method" title="#superselector? (instance method)">#<strong>superselector?</strong>(seq) &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns whether or not this selector matches all elements that the given
selector matches (as well as possibly more).</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong>(opts = {}) &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#unify-instance_method" title="#unify (instance method)">#<strong>unify</strong>(other) &#x21d2; CommaSequence<sup>?</sup> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Unifies this with another selector sequence to produce a selector that
matches (a subset of) the intersection of the two inputs.</p>
</div></span>
</li>
</ul>
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="AbstractSequence.html" title="Sass::Selector::AbstractSequence (class)">AbstractSequence</a></span></h3>
<p class="inherited"><span class='object_link'><a href="AbstractSequence.html#eql%3F-instance_method" title="Sass::Selector::AbstractSequence#eql? (method)">#eql?</a></span>, <span class='object_link'><a href="AbstractSequence.html#hash-instance_method" title="Sass::Selector::AbstractSequence#hash (method)">#hash</a></span>, <span class='object_link'><a href="AbstractSequence.html#invisible%3F-instance_method" title="Sass::Selector::AbstractSequence#invisible? (method)">#invisible?</a></span>, <span class='object_link'><a href="AbstractSequence.html#specificity-instance_method" title="Sass::Selector::AbstractSequence#specificity (method)">#specificity</a></span></p>
<div id="constructor_details" class="method_details_list">
<h2>Constructor Details</h2>
<div class="method_details first">
<h3 class="signature first" id="initialize-instance_method">
#<strong>initialize</strong>(seqs_and_ops) &#x21d2; <tt><span class='object_link'><a href="" title="Sass::Selector::Sequence (class)">Sequence</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns a new instance of Sequence</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>seqs_and_ops</span>
<span class='type'>(<tt>Array&lt;<span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">SimpleSequence</a></span>, String|Array&lt;<span class='object_link'><a href="../Tree/Node.html" title="Sass::Tree::Node (class)">Sass::Tree::Node</a></span>, String&gt;&gt;</tt>)</span>
&mdash;
<div class='inline'>
<p>See <span class='object_link'><a href="#members-instance_method" title="Sass::Selector::Sequence#members (method)">#members</a></span></p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
38
39
40</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/sequence.rb', line 38</span>
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_seqs_and_ops'>seqs_and_ops</span><span class='rparen'>)</span>
<span class='ivar'>@members</span> <span class='op'>=</span> <span class='id identifier rubyid_seqs_and_ops'>seqs_and_ops</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
<div id="constructor_details" class="method_details_list">
<h2>Constructor Details</h2>
<div class="method_details first">
<h3 class="signature first" id="initialize-instance_method">
#<strong>initialize</strong>(seqs_and_ops) &#x21d2; <tt><span class='object_link'><a href="" title="Sass::Selector::Sequence (class)">Sequence</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns a new instance of Sequence</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>seqs_and_ops</span>
<span class='type'>(<tt>Array&lt;<span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">SimpleSequence</a></span>, String|Array&lt;<span class='object_link'><a href="../Tree/Node.html" title="Sass::Tree::Node (class)">Sass::Tree::Node</a></span>, String&gt;&gt;</tt>)</span>
&mdash;
<div class='inline'>
<p>See <span class='object_link'><a href="#members-instance_method" title="Sass::Selector::Sequence#members (method)">#members</a></span></p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
38
39
40</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/sequence.rb', line 38</span>
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_seqs_and_ops'>seqs_and_ops</span><span class='rparen'>)</span>
<span class='ivar'>@members</span> <span class='op'>=</span> <span class='id identifier rubyid_seqs_and_ops'>seqs_and_ops</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
<div id="instance_attr_details" class="attr_details">
<h2>Instance Attribute Details</h2>
<span id=""></span>
<div class="method_details first">
<h3 class="signature first" id="members-instance_method">
#<strong>members</strong> &#x21d2; <tt>Array&lt;<span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">SimpleSequence</a></span>, String|Array&lt;<span class='object_link'><a href="../Tree/Node.html" title="Sass::Tree::Node (class)">Sass::Tree::Node</a></span>, String&gt;&gt;</tt> <span class="extras">(readonly)</span>
</h3><div class="docstring">
<div class="discussion">
<p>The array of <span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">simple selector sequences</a></span>, operators, and
newlines. The operators are strings such as `“+”` and `“&gt;”` representing
the corresponding CSS operators, or interpolated SassScript. Newlines are
also newline strings; these aren&#39;t semantically relevant, but they do
affect formatting.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Array&lt;<span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">SimpleSequence</a></span>, String|Array&lt;<span class='object_link'><a href="../Tree/Node.html" title="Sass::Tree::Node (class)">Sass::Tree::Node</a></span>, String&gt;&gt;</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
34
35
36</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/sequence.rb', line 34</span>
<span class='kw'>def</span> <span class='id identifier rubyid_members'>members</span>
<span class='ivar'>@members</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="add_sources!-instance_method">
#<strong>add_sources!</strong>(sources) &#x21d2; <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Add to the <span class='object_link'><a href="SimpleSequence.html#sources-instance_method" title="Sass::Selector::SimpleSequence#sources (method)">Sass::Selector::SimpleSequence#sources</a></span> sets of the child simple sequences.
This destructively modifies this sequence&#39;s members array, but not the
child simple sequences.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>sources</span>
<span class='type'>(<tt>Set&lt;<span class='object_link'><a href="" title="Sass::Selector::Sequence (class)">Sequence</a></span>&gt;</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
181
182
183</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/sequence.rb', line 181</span>
<span class='kw'>def</span> <span class='id identifier rubyid_add_sources!'>add_sources!</span><span class='lparen'>(</span><span class='id identifier rubyid_sources'>sources</span><span class='rparen'>)</span>
<span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_map!'>map!</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_m'>m</span><span class='op'>|</span> <span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">SimpleSequence</a></span></span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='id identifier rubyid_with_more_sources'>with_more_sources</span><span class='lparen'>(</span><span class='id identifier rubyid_sources'>sources</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_m'>m</span><span class='rbrace'>}</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="contains_parent_ref?-instance_method">
#<strong>contains_parent_ref?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns whether there&#39;s a <span class='object_link'><a href="Parent.html" title="Sass::Selector::Parent (class)">Parent</a></span> selector anywhere in this sequence.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
83
84
85
86
87
88
89
90
91</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/sequence.rb', line 83</span>
<span class='kw'>def</span> <span class='id identifier rubyid_contains_parent_ref?'>contains_parent_ref?</span>
<span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_sseq_or_op'>sseq_or_op</span><span class='op'>|</span>
<span class='kw'>next</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_sseq_or_op'>sseq_or_op</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">SimpleSequence</a></span></span><span class='rparen'>)</span>
<span class='kw'>next</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id identifier rubyid_sseq_or_op'>sseq_or_op</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Parent.html" title="Sass::Selector::Parent (class)">Parent</a></span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_sseq_or_op'>sseq_or_op</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_sel'>sel</span><span class='op'>|</span>
<span class='id identifier rubyid_sel'>sel</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Pseudo.html" title="Sass::Selector::Pseudo (class)">Pseudo</a></span></span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_sel'>sel</span><span class='period'>.</span><span class='id identifier rubyid_selector'>selector</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_sel'>sel</span><span class='period'>.</span><span class='id identifier rubyid_selector'>selector</span><span class='period'>.</span><span class='id identifier rubyid_contains_parent_ref?'>contains_parent_ref?</span>
<span class='kw'>end</span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="do_extend-instance_method">
#<strong>do_extend</strong>(extends, parent_directives, replace, seen, original) &#x21d2; <tt>Array&lt;<span class='object_link'><a href="" title="Sass::Selector::Sequence (class)">Sequence</a></span>&gt;</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Non-destructively extends this selector with the extensions specified in a
hash (which should come from <span class='object_link'><a href="../Tree/Visitors/Cssize.html" title="Sass::Tree::Visitors::Cssize (class)">Tree::Visitors::Cssize</a></span>).</p>
<pre class="code ruby"><code class="ruby"><span class='const'>The</span> <span class='id identifier rubyid_extensions'>extensions</span> <span class='id identifier rubyid_to'>to</span> <span class='id identifier rubyid_perform'>perform</span> <span class='id identifier rubyid_on'>on</span> <span class='id identifier rubyid_this'>this</span> <span class='id identifier rubyid_selector'>selector</span>
</code></pre>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>extends</span>
<span class='type'>(<tt><span class='object_link'><a href="../Util/SubsetMap.html" title="Sass::Util::SubsetMap (class)">Sass::Util::SubsetMap</a></span>{<span class='object_link'><a href="Simple.html" title="Sass::Selector::Simple (class)">Selector::Simple</a></span> =&gt;
<span class='object_link'><a href="../Tree/Visitors/Cssize/Extend.html" title="Sass::Tree::Visitors::Cssize::Extend (class)">Sass::Tree::Visitors::Cssize::Extend</a></span>}</tt>)</span>
</li>
<li>
<span class='name'>parent_directives</span>
<span class='type'>(<tt>Array&lt;<span class='object_link'><a href="../Tree/DirectiveNode.html" title="Sass::Tree::DirectiveNode (class)">Sass::Tree::DirectiveNode</a></span>&gt;</tt>)</span>
&mdash;
<div class='inline'>
<p>The directives containing this selector.</p>
</div>
</li>
<li>
<span class='name'>replace</span>
<span class='type'>(<tt>Boolean</tt>)</span>
&mdash;
<div class='inline'>
<p>Whether to replace the original selector entirely or include it in the
result.</p>
</div>
</li>
<li>
<span class='name'>seen</span>
<span class='type'>(<tt>Set&lt;Array&lt;<span class='object_link'><a href="Simple.html" title="Sass::Selector::Simple (class)">Selector::Simple</a></span>&gt;&gt;</tt>)</span>
&mdash;
<div class='inline'>
<p>The set of simple sequences that are currently being replaced.</p>
</div>
</li>
<li>
<span class='name'>original</span>
<span class='type'>(<tt>Boolean</tt>)</span>
&mdash;
<div class='inline'>
<p>Whether this is the original selector being extended, as opposed to the
result of a previous extension that&#39;s being re-extended.</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Array&lt;<span class='object_link'><a href="" title="Sass::Selector::Sequence (class)">Sequence</a></span>&gt;</tt>)</span>
&mdash;
<div class='inline'>
<p>A list of selectors generated by extending this selector with `extends`.
These correspond to a <span class='object_link'><a href="CommaSequence.html" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span>&#39;s <span class='object_link'><a href="CommaSequence.html#members-instance_method" title="Sass::Selector::CommaSequence#members (method)">members array</a></span>.</p>
</div>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li><span class='object_link'><a href="CommaSequence.html#do_extend-instance_method" title="Sass::Selector::CommaSequence#do_extend (method)">CommaSequence#do_extend</a></span></li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/sequence.rb', line 113</span>
<span class='kw'>def</span> <span class='id identifier rubyid_do_extend'>do_extend</span><span class='lparen'>(</span><span class='id identifier rubyid_extends'>extends</span><span class='comma'>,</span> <span class='id identifier rubyid_parent_directives'>parent_directives</span><span class='comma'>,</span> <span class='id identifier rubyid_replace'>replace</span><span class='comma'>,</span> <span class='id identifier rubyid_seen'>seen</span><span class='comma'>,</span> <span class='id identifier rubyid_original'>original</span><span class='rparen'>)</span>
<span class='id identifier rubyid_extended_not_expanded'>extended_not_expanded</span> <span class='op'>=</span> <span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_sseq_or_op'>sseq_or_op</span><span class='op'>|</span>
<span class='kw'>next</span> <span class='lbracket'>[</span><span class='lbracket'>[</span><span class='id identifier rubyid_sseq_or_op'>sseq_or_op</span><span class='rbracket'>]</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_sseq_or_op'>sseq_or_op</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">SimpleSequence</a></span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_extended'>extended</span> <span class='op'>=</span> <span class='id identifier rubyid_sseq_or_op'>sseq_or_op</span><span class='period'>.</span><span class='id identifier rubyid_do_extend'>do_extend</span><span class='lparen'>(</span><span class='id identifier rubyid_extends'>extends</span><span class='comma'>,</span> <span class='id identifier rubyid_parent_directives'>parent_directives</span><span class='comma'>,</span> <span class='id identifier rubyid_replace'>replace</span><span class='comma'>,</span> <span class='id identifier rubyid_seen'>seen</span><span class='rparen'>)</span>
<span class='comment'># The First Law of Extend says that the generated selector should have
</span> <span class='comment'># specificity greater than or equal to that of the original selector.
</span> <span class='comment'># In order to ensure that, we record the original selector&#39;s
</span> <span class='comment'># (`extended.first`) original specificity.
</span> <span class='id identifier rubyid_extended'>extended</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_add_sources!'>add_sources!</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='kw'>self</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_original'>original</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_invisible?'>invisible?</span>
<span class='id identifier rubyid_extended'>extended</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_seq'>seq</span><span class='op'>|</span> <span class='id identifier rubyid_seq'>seq</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span><span class='rbrace'>}</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_weaves'>weaves</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Util.html" title="Sass::Util (module)">Util</a></span></span><span class='period'>.</span><span class='id identifier rubyid_paths'><span class='object_link'><a href="../Util.html#paths-instance_method" title="Sass::Util#paths (method)">paths</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_extended_not_expanded'>extended_not_expanded</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_path'>path</span><span class='op'>|</span> <span class='id identifier rubyid_weave'>weave</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span><span class='rbrace'>}</span>
<span class='id identifier rubyid_trim'>trim</span><span class='lparen'>(</span><span class='id identifier rubyid_weaves'>weaves</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span> <span class='const'><span class='object_link'><a href="" title="Sass::Selector::Sequence (class)">Sequence</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Sass::Selector::Sequence#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_p'>p</span><span class='rparen'>)</span><span class='rbrace'>}</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="filename=-instance_method">
#<strong>filename=</strong>(filename) &#x21d2; <tt>String</tt><sup>?</sup>
</h3><div class="docstring">
<div class="discussion">
<p>Sets the name of the file in which this selector was declared, or `nil` if
it was not declared in a file (e.g. on stdin). This also sets the filename
for all child selectors.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>filename</span>
<span class='type'>(<tt>String</tt>, <tt>nil</tt>)</span>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>String</tt>, <tt>nil</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
22
23
24
25</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/sequence.rb', line 22</span>
<span class='kw'>def</span> <span class='id identifier rubyid_filename='>filename=</span><span class='lparen'>(</span><span class='id identifier rubyid_filename'>filename</span><span class='rparen'>)</span>
<span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_m'>m</span><span class='op'>|</span> <span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='id identifier rubyid_filename'>filename</span> <span class='op'>=</span> <span class='id identifier rubyid_filename'>filename</span> <span class='kw'>if</span> <span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">SimpleSequence</a></span></span><span class='rparen'>)</span><span class='rbrace'>}</span>
<span class='id identifier rubyid_filename'>filename</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="inspect-instance_method">
#<strong>inspect</strong> &#x21d2; <tt>String</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns a string representation of the sequence. This is basically the
selector string.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>String</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
172
173
174</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/sequence.rb', line 172</span>
<span class='kw'>def</span> <span class='id identifier rubyid_inspect'>inspect</span>
<span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_m'>m</span><span class='op'>|</span> <span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="line=-instance_method">
#<strong>line=</strong>(line) &#x21d2; <tt>Integer</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Sets the line of the Sass template on which this selector was declared.
This also sets the line for all child selectors.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>line</span>
<span class='type'>(<tt>Integer</tt>)</span>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Integer</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
11
12
13
14</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/sequence.rb', line 11</span>
<span class='kw'>def</span> <span class='id identifier rubyid_line='>line=</span><span class='lparen'>(</span><span class='id identifier rubyid_line'>line</span><span class='rparen'>)</span>
<span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_m'>m</span><span class='op'>|</span> <span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='id identifier rubyid_line'>line</span> <span class='kw'>if</span> <span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">SimpleSequence</a></span></span><span class='rparen'>)</span><span class='rbrace'>}</span>
<span class='ivar'>@line</span> <span class='op'>=</span> <span class='id identifier rubyid_line'>line</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="resolve_parent_refs-instance_method">
#<strong>resolve_parent_refs</strong>(super_cseq, implicit_parent) &#x21d2; <tt><span class='object_link'><a href="CommaSequence.html" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Resolves the <span class='object_link'><a href="Parent.html" title="Sass::Selector::Parent (class)">Parent</a></span> selectors within this selector by replacing them with
the given parent selector, handling commas appropriately.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>super_cseq</span>
<span class='type'>(<tt><span class='object_link'><a href="CommaSequence.html" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>The parent selector</p>
</div>
</li>
<li>
<span class='name'>implicit_parent</span>
<span class='type'>(<tt>Boolean</tt>)</span>
&mdash;
<div class='inline'>
<p>Whether the the parent selector should automatically be prepended to the
resolved selector if it contains no parent refs.</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt><span class='object_link'><a href="CommaSequence.html" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>This selector, with parent references resolved</p>
</div>
</li>
</ul>
<p class="tag_title">Raises:</p>
<ul class="raise">
<li>
<span class='type'>(<tt><span class='object_link'><a href="../SyntaxError.html" title="Sass::SyntaxError (class)">Sass::SyntaxError</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>If a parent selector is invalid</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/sequence.rb', line 52</span>
<span class='kw'>def</span> <span class='id identifier rubyid_resolve_parent_refs'>resolve_parent_refs</span><span class='lparen'>(</span><span class='id identifier rubyid_super_cseq'>super_cseq</span><span class='comma'>,</span> <span class='id identifier rubyid_implicit_parent'>implicit_parent</span><span class='rparen'>)</span>
<span class='id identifier rubyid_members'>members</span> <span class='op'>=</span> <span class='ivar'>@members</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
<span class='id identifier rubyid_nl'>nl</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_shift'>shift</span><span class='rparen'>)</span>
<span class='id identifier rubyid_contains_parent_ref'>contains_parent_ref</span> <span class='op'>=</span> <span class='id identifier rubyid_contains_parent_ref?'>contains_parent_ref?</span>
<span class='kw'>return</span> <span class='const'><span class='object_link'><a href="CommaSequence.html" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="CommaSequence.html#initialize-instance_method" title="Sass::Selector::CommaSequence#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='kw'>self</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_implicit_parent'>implicit_parent</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_contains_parent_ref'>contains_parent_ref</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_contains_parent_ref'>contains_parent_ref</span>
<span class='id identifier rubyid_old_members'>old_members</span><span class='comma'>,</span> <span class='id identifier rubyid_members'>members</span> <span class='op'>=</span> <span class='id identifier rubyid_members'>members</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_members'>members</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_nl'>nl</span> <span class='kw'>if</span> <span class='id identifier rubyid_nl'>nl</span>
<span class='id identifier rubyid_members'>members</span> <span class='op'>&lt;&lt;</span> <span class='const'><span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">SimpleSequence</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="SimpleSequence.html#initialize-instance_method" title="Sass::Selector::SimpleSequence#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="Parent.html" title="Sass::Selector::Parent (class)">Parent</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Parent.html#initialize-instance_method" title="Sass::Selector::Parent#initialize (method)">new</a></span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
<span class='id identifier rubyid_members'>members</span> <span class='op'>+=</span> <span class='id identifier rubyid_old_members'>old_members</span>
<span class='kw'>end</span>
<span class='const'><span class='object_link'><a href="CommaSequence.html" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="CommaSequence.html#initialize-instance_method" title="Sass::Selector::CommaSequence#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Util.html" title="Sass::Util (module)">Util</a></span></span><span class='period'>.</span><span class='id identifier rubyid_paths'><span class='object_link'><a href="../Util.html#paths-instance_method" title="Sass::Util#paths (method)">paths</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_sseq_or_op'>sseq_or_op</span><span class='op'>|</span>
<span class='kw'>next</span> <span class='lbracket'>[</span><span class='id identifier rubyid_sseq_or_op'>sseq_or_op</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_sseq_or_op'>sseq_or_op</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">SimpleSequence</a></span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_sseq_or_op'>sseq_or_op</span><span class='period'>.</span><span class='id identifier rubyid_resolve_parent_refs'>resolve_parent_refs</span><span class='lparen'>(</span><span class='id identifier rubyid_super_cseq'>super_cseq</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span>
<span class='kw'>end</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_path'>path</span><span class='op'>|</span>
<span class='id identifier rubyid_path_members'>path_members</span> <span class='op'>=</span> <span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_seq_or_op'>seq_or_op</span><span class='op'>|</span>
<span class='kw'>next</span> <span class='id identifier rubyid_seq_or_op'>seq_or_op</span> <span class='kw'>unless</span> <span class='id identifier rubyid_seq_or_op'>seq_or_op</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="" title="Sass::Selector::Sequence (class)">Sequence</a></span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_seq_or_op'>seq_or_op</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span>
<span class='kw'>end</span>
<span class='kw'>if</span> <span class='id identifier rubyid_path_members'>path_members</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>==</span> <span class='int'>2</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_path_members'>path_members</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span>
<span class='id identifier rubyid_path_members'>path_members</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_unshift'>unshift</span> <span class='id identifier rubyid_path_members'>path_members</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_shift'>shift</span>
<span class='kw'>end</span>
<span class='const'><span class='object_link'><a href="" title="Sass::Selector::Sequence (class)">Sequence</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Sass::Selector::Sequence#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_path_members'>path_members</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='rparen'>)</span>
<span class='kw'>end</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="subjectless-instance_method">
#<strong>subjectless</strong> &#x21d2; <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Converts the subject operator “!”, if it exists, into a “:has()” selector.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/sequence.rb', line 189</span>
<span class='kw'>def</span> <span class='id identifier rubyid_subjectless'>subjectless</span>
<span class='id identifier rubyid_pre_subject'>pre_subject</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_has'>has</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_subject'>subject</span> <span class='op'>=</span> <span class='kw'>nil</span>
<span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_sseq_or_op'>sseq_or_op</span><span class='op'>|</span>
<span class='kw'>if</span> <span class='id identifier rubyid_subject'>subject</span>
<span class='id identifier rubyid_has'>has</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_sseq_or_op'>sseq_or_op</span>
<span class='kw'>elsif</span> <span class='id identifier rubyid_sseq_or_op'>sseq_or_op</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='op'>!</span><span class='id identifier rubyid_sseq_or_op'>sseq_or_op</span><span class='period'>.</span><span class='id identifier rubyid_subject?'>subject?</span>
<span class='id identifier rubyid_pre_subject'>pre_subject</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_sseq_or_op'>sseq_or_op</span>
<span class='kw'>else</span>
<span class='id identifier rubyid_subject'>subject</span> <span class='op'>=</span> <span class='id identifier rubyid_sseq_or_op'>sseq_or_op</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
<span class='id identifier rubyid_subject'>subject</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span> <span class='op'>=</span> <span class='id identifier rubyid_sseq_or_op'>sseq_or_op</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
<span class='id identifier rubyid_subject'>subject</span><span class='period'>.</span><span class='id identifier rubyid_subject'>subject</span> <span class='op'>=</span> <span class='kw'>false</span>
<span class='id identifier rubyid_has'>has</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='kw'>end</span>
<span class='kw'>end</span>
<span class='kw'>return</span> <span class='kw'>self</span> <span class='kw'>unless</span> <span class='id identifier rubyid_subject'>subject</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_has'>has</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
<span class='id identifier rubyid_subject'>subject</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span> <span class='op'>&lt;&lt;</span> <span class='const'><span class='object_link'><a href="Pseudo.html" title="Sass::Selector::Pseudo (class)">Pseudo</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Pseudo.html#initialize-instance_method" title="Sass::Selector::Pseudo#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='symbol'>:class</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>has</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="CommaSequence.html" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="CommaSequence.html#initialize-instance_method" title="Sass::Selector::CommaSequence#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="" title="Sass::Selector::Sequence (class)">Sequence</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Sass::Selector::Sequence#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_has'>has</span><span class='rparen'>)</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='const'><span class='object_link'><a href="" title="Sass::Selector::Sequence (class)">Sequence</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Sass::Selector::Sequence#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_pre_subject'>pre_subject</span> <span class='op'>+</span> <span class='lbracket'>[</span><span class='id identifier rubyid_subject'>subject</span><span class='rbracket'>]</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="superselector?-instance_method">
#<strong>superselector?</strong>(seq) &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns whether or not this selector matches all elements that the given
selector matches (as well as possibly more).</p>
</div>
</div>
<div class="tags">
<div class="examples">
<p class="tag_title">Examples:</p>
<pre class="example code"><code>(.foo).superselector?(.foo.bar) #=&gt; true
(.foo).superselector?(.bar) #=&gt; false</code></pre>
</div>
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>cseq</span>
<span class='type'>(<tt><span class='object_link'><a href="" title="Sass::Selector::Sequence (class)">Sequence</a></span></tt>)</span>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
159
160
161</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/sequence.rb', line 159</span>
<span class='kw'>def</span> <span class='id identifier rubyid_superselector?'>superselector?</span><span class='lparen'>(</span><span class='id identifier rubyid_seq'>seq</span><span class='rparen'>)</span>
<span class='id identifier rubyid__superselector?'>_superselector?</span><span class='lparen'>(</span><span class='id identifier rubyid_members'>members</span><span class='comma'>,</span> <span class='id identifier rubyid_seq'>seq</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="to_s-instance_method">
#<strong>to_s</strong>(opts = {}) &#x21d2; <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">See Also:</p>
<ul class="see">
<li><span class='object_link'><a href="AbstractSequence.html#to_s-instance_method" title="Sass::Selector::AbstractSequence#to_s (method)">AbstractSequence#to_s</a></span></li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
164
165
166</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/sequence.rb', line 164</span>
<span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
<span class='ivar'>@members</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_m'>m</span><span class='op'>|</span> <span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_m'>m</span> <span class='op'>:</span> <span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'> ?\n ?</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="unify-instance_method">
#<strong>unify</strong>(other) &#x21d2; <tt><span class='object_link'><a href="CommaSequence.html" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></tt><sup>?</sup>
</h3><div class="docstring">
<div class="discussion">
<p>Unifies this with another selector sequence to produce a selector that
matches (a subset of) the intersection of the two inputs.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>other</span>
<span class='type'>(<tt><span class='object_link'><a href="" title="Sass::Selector::Sequence (class)">Sequence</a></span></tt>)</span>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt><span class='object_link'><a href="CommaSequence.html" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></tt>, <tt>nil</tt>)</span>
&mdash;
<div class='inline'>
<p>The unified selector, or nil if unification failed.</p>
</div>
</li>
</ul>
<p class="tag_title">Raises:</p>
<ul class="raise">
<li>
<span class='type'>(<tt><span class='object_link'><a href="../SyntaxError.html" title="Sass::SyntaxError (class)">Sass::SyntaxError</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>If this selector cannot be unified. This will only ever occur when a
dynamic selector, such as <span class='object_link'><a href="Parent.html" title="Sass::Selector::Parent (class)">Parent</a></span> or Interpolation, is used in
unification. Since these selectors should be resolved by the time extension
and unification happen, this exception will only ever be raised as a result
of programmer error</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
141
142
143
144
145
146
147
148
149</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/sequence.rb', line 141</span>
<span class='kw'>def</span> <span class='id identifier rubyid_unify'>unify</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
<span class='id identifier rubyid_base'>base</span> <span class='op'>=</span> <span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span>
<span class='id identifier rubyid_other_base'>other_base</span> <span class='op'>=</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">SimpleSequence</a></span></span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_other_base'>other_base</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">SimpleSequence</a></span></span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='lparen'>(</span><span class='id identifier rubyid_unified'>unified</span> <span class='op'>=</span> <span class='id identifier rubyid_other_base'>other_base</span><span class='period'>.</span><span class='id identifier rubyid_unify'>unify</span><span class='lparen'>(</span><span class='id identifier rubyid_base'>base</span><span class='rparen'>)</span><span class='rparen'>)</span>
<span class='id identifier rubyid_woven'>woven</span> <span class='op'>=</span> <span class='id identifier rubyid_weave'>weave</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='id identifier rubyid_members'>members</span><span class='lbracket'>[</span><span class='int'>0</span><span class='op'>...</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span><span class='lbracket'>[</span><span class='int'>0</span><span class='op'>...</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='lbracket'>[</span><span class='id identifier rubyid_unified'>unified</span><span class='rbracket'>]</span><span class='rbracket'>]</span><span class='rparen'>)</span>
<span class='const'><span class='object_link'><a href="CommaSequence.html" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="CommaSequence.html#initialize-instance_method" title="Sass::Selector::CommaSequence#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_woven'>woven</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_w'>w</span><span class='op'>|</span> <span class='const'><span class='object_link'><a href="" title="Sass::Selector::Sequence (class)">Sequence</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Sass::Selector::Sequence#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_w'>w</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Mon Oct 22 13:20:56 2018 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.12 (ruby-2.5.3).
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-535380-14', 'sass-lang.com');
ga('send', 'pageview');
</script>
</body>
</html>