sass-site/source/documentation/Sass/Selector/Simple.html

966 lines
27 KiB
HTML
Raw Normal View History

2018-10-22 23:13:05 +02:00
<!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::Simple
&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/Simple.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">Simple</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::Simple
</h1>
<dl class="box">
<dt class="r1">Inherits:</dt>
<dd class="r1">
<span class="inheritName">Object</span>
<ul class="fullTree">
<li>Object</li>
<li class="next">Sass::Selector::Simple</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/simple.rb</dd>
</dl>
<div class="clear"></div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>The abstract superclass for simple selectors (that is, those that don&#39;t
compose multiple selectors).</p>
</div>
</div>
<div class="tags">
</div><div id="subclasses">
<h2>Direct Known Subclasses</h2>
<p class="children"><span class='object_link'><a href="Attribute.html" title="Sass::Selector::Attribute (class)">Attribute</a></span>, <span class='object_link'><a href="Class.html" title="Sass::Selector::Class (class)">Class</a></span>, <span class='object_link'><a href="Element.html" title="Sass::Selector::Element (class)">Element</a></span>, <span class='object_link'><a href="Id.html" title="Sass::Selector::Id (class)">Id</a></span>, <span class='object_link'><a href="Parent.html" title="Sass::Selector::Parent (class)">Parent</a></span>, <span class='object_link'><a href="Placeholder.html" title="Sass::Selector::Placeholder (class)">Placeholder</a></span>, <span class='object_link'><a href="Pseudo.html" title="Sass::Selector::Pseudo (class)">Pseudo</a></span>, <span class='object_link'><a href="Universal.html" title="Sass::Selector::Universal (class)">Universal</a></span></p>
</div>
<div id="subclasses">
<h2>Direct Known Subclasses</h2>
<p class="children"><span class='object_link'><a href="Attribute.html" title="Sass::Selector::Attribute (class)">Attribute</a></span>, <span class='object_link'><a href="Class.html" title="Sass::Selector::Class (class)">Class</a></span>, <span class='object_link'><a href="Element.html" title="Sass::Selector::Element (class)">Element</a></span>, <span class='object_link'><a href="Id.html" title="Sass::Selector::Id (class)">Id</a></span>, <span class='object_link'><a href="Parent.html" title="Sass::Selector::Parent (class)">Parent</a></span>, <span class='object_link'><a href="Placeholder.html" title="Sass::Selector::Placeholder (class)">Placeholder</a></span>, <span class='object_link'><a href="Pseudo.html" title="Sass::Selector::Pseudo (class)">Pseudo</a></span>, <span class='object_link'><a href="Universal.html" title="Sass::Selector::Universal (class)">Universal</a></span></p>
</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="#filename-instance_method" title="#filename (instance method)">#<strong>filename</strong> &#x21d2; String<sup>?</sup> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>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="#line-instance_method" title="#line (instance method)">#<strong>line</strong> &#x21d2; Integer </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>The line of the Sass template on which this selector was declared.</p>
</div></span>
</li>
</ul>
<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="#eql%3F-instance_method" title="#eql? (instance method)">#<strong>eql?</strong>(other) &#x21d2; Boolean </a>
(also: #==)
</span>
<span class="summary_desc"><div class='inline'>
<p>Checks equality between this and another object.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#hash-instance_method" title="#hash (instance method)">#<strong>hash</strong> &#x21d2; Integer </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns a hash code for this selector object.</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'></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; String </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the selector string.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#unify-instance_method" title="#unify (instance method)">#<strong>unify</strong>(sels) &#x21d2; Array&lt;Simple&gt;<sup>?</sup> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Unifies this selector with a <span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">SimpleSequence</a></span>&#39;s <span class='object_link'><a href="SimpleSequence.html#members-instance_method" title="Sass::Selector::SimpleSequence#members (method)">members array</a></span>, returning another `SimpleSequence` members array that
matches both this selector and the input selector.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#unique%3F-instance_method" title="#unique? (instance method)">#<strong>unique?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Whether only one instance of this simple selector is allowed in a given
complex selector.</p>
</div></span>
</li>
</ul>
<div id="instance_attr_details" class="attr_details">
<h2>Instance Attribute Details</h2>
<span id="filename=-instance_method"></span>
<div class="method_details first">
<h3 class="signature first" id="filename-instance_method">
#<strong>filename</strong> &#x21d2; <tt>String</tt><sup>?</sup>
</h3><div class="docstring">
<div class="discussion">
<p>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>
</div>
<div class="tags">
<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">
15
16
17</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/simple.rb', line 15</span>
<span class='kw'>def</span> <span class='id identifier rubyid_filename'>filename</span>
<span class='ivar'>@filename</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id="line=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="line-instance_method">
#<strong>line</strong> &#x21d2; <tt>Integer</tt>
</h3><div class="docstring">
<div class="discussion">
<p>The line of the Sass template on which this selector was declared.</p>
</div>
</div>
<div class="tags">
<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">
9
10
11</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/simple.rb', line 9</span>
<span class='kw'>def</span> <span class='id identifier rubyid_line'>line</span>
<span class='ivar'>@line</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="eql?-instance_method">
#<strong>eql?</strong>(other) &#x21d2; <tt>Boolean</tt>
<span class="aliases">Also known as:
<span class="names"><span id='==-instance_method'>==</span></span>
</span>
</h3><div class="docstring">
<div class="discussion">
<p>Checks equality between this and another object.</p>
<p>By default, this is based on the value of #to_a, so if that contains
information irrelevant to the identity of the selector, this should be
overridden.</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>Object</tt>)</span>
&mdash;
<div class='inline'>
<p>The object to test equality against</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
&mdash;
<div class='inline'>
<p>Whether or not this is equal to `other`</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
60
61
62</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/simple.rb', line 60</span>
<span class='kw'>def</span> <span class='id identifier rubyid_eql?'>eql?</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
<span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span> <span class='op'>==</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_hash'>hash</span> <span class='op'>==</span> <span class='id identifier rubyid_hash'>hash</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_equality_key'>equality_key</span> <span class='op'>==</span> <span class='id identifier rubyid_equality_key'>equality_key</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="hash-instance_method">
#<strong>hash</strong> &#x21d2; <tt>Integer</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns a hash code for this selector object.</p>
<p>By default, this is based on the value of #to_a, so if that contains
information irrelevant to the identity of the selector, this should be
overridden.</p>
</div>
</div>
<div class="tags">
<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">
48
49
50</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/simple.rb', line 48</span>
<span class='kw'>def</span> <span class='id identifier rubyid_hash'>hash</span>
<span class='ivar'>@_hash</span> <span class='op'>||=</span> <span class='id identifier rubyid_equality_key'>equality_key</span><span class='period'>.</span><span class='id identifier rubyid_hash'>hash</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">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>String</tt>)</span>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li><span class='object_link'><a href="#to_s-instance_method" title="Sass::Selector::Simple#to_s (method)">#to_s</a></span></li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
28
29
30</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/simple.rb', line 28</span>
<span class='kw'>def</span> <span class='id identifier rubyid_inspect'>inspect</span>
<span class='id identifier rubyid_to_s'>to_s</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>String</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the selector string.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>opts</span>
<span class='type'>(<tt>Hash</tt>)</span>
<em class="default">(defaults to: <tt>{}</tt>)</em>
&mdash;
<div class='inline'>
<p>rendering options.</p>
</div>
</li>
</ul>
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
<ul class="option">
<li>
<span class="name">:style</span>
<span class="type">(<tt>Symbol</tt>)</span>
<span class="default">
</span>
&mdash; <div class='inline'>
<p>The css rendering style.</p>
</div>
</li>
</ul>
<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">
37
38
39</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/simple.rb', line 37</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='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_abstract'><span class='object_link'><a href="../Util.html#abstract-instance_method" title="Sass::Util#abstract (method)">abstract</a></span></span><span class='lparen'>(</span><span class='kw'>self</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>(sels) &#x21d2; <tt>Array&lt;<span class='object_link'><a href="" title="Sass::Selector::Simple (class)">Simple</a></span>&gt;</tt><sup>?</sup>
</h3><div class="docstring">
<div class="discussion">
<p>Unifies this selector with a <span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">Sass::Selector::SimpleSequence</a></span>&#39;s <span class='object_link'><a href="SimpleSequence.html#members-instance_method" title="Sass::Selector::SimpleSequence#members (method)">members array</a></span>, returning another `SimpleSequence` members array that
matches both this selector and the input selector.</p>
<p>By default, this just appends this selector to the end of the array (or
returns the original array if this selector already exists in it).</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>sels</span>
<span class='type'>(<tt>Array&lt;<span class='object_link'><a href="" title="Sass::Selector::Simple (class)">Simple</a></span>&gt;</tt>)</span>
&mdash;
<div class='inline'>
<p>A <span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">Sass::Selector::SimpleSequence</a></span>&#39;s <span class='object_link'><a href="SimpleSequence.html#members-instance_method" title="Sass::Selector::SimpleSequence#members (method)">members array</a></span></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::Simple (class)">Simple</a></span>&gt;</tt>, <tt>nil</tt>)</span>
&mdash;
<div class='inline'>
<p>A <span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">Sass::Selector::SimpleSequence</a></span> <span class='object_link'><a href="SimpleSequence.html#members-instance_method" title="Sass::Selector::SimpleSequence#members (method)">members array</a></span> matching both
`sels` and this selector, or `nil` if this is impossible (e.g. unifying
`#foo` and `#bar`)</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">
82
83
84
85
86
87
88
89
90</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/simple.rb', line 82</span>
<span class='kw'>def</span> <span class='id identifier rubyid_unify'>unify</span><span class='lparen'>(</span><span class='id identifier rubyid_sels'>sels</span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='id identifier rubyid_sels'>sels</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_unify'>unify</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_sels'>sels</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>==</span> <span class='int'>1</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_sels'>sels</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="Universal.html" title="Sass::Selector::Universal (class)">Universal</a></span></span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='id identifier rubyid_sels'>sels</span> <span class='kw'>if</span> <span class='id identifier rubyid_sels'>sels</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_sel2'>sel2</span><span class='op'>|</span> <span class='id identifier rubyid_eql?'>eql?</span><span class='lparen'>(</span><span class='id identifier rubyid_sel2'>sel2</span><span class='rparen'>)</span><span class='rbrace'>}</span>
<span class='kw'>if</span> <span class='op'>!</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'>||</span> <span class='lparen'>(</span><span class='id identifier rubyid_sels'>sels</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</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_sels'>sels</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='symbol'>:element</span><span class='rparen'>)</span>
<span class='id identifier rubyid__'>_</span><span class='comma'>,</span> <span class='id identifier rubyid_i'>i</span> <span class='op'>=</span> <span class='id identifier rubyid_sels'>sels</span><span class='period'>.</span><span class='id identifier rubyid_each_with_index'>each_with_index</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_sel'>sel</span><span class='comma'>,</span> <span class='id identifier rubyid__'>_</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='rbrace'>}</span>
<span class='kw'>end</span>
<span class='kw'>return</span> <span class='id identifier rubyid_sels'>sels</span> <span class='op'>+</span> <span class='lbracket'>[</span><span class='kw'>self</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_i'>i</span>
<span class='id identifier rubyid_sels'>sels</span><span class='lbracket'>[</span><span class='int'>0</span><span class='op'>...</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='lbracket'>[</span><span class='kw'>self</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='id identifier rubyid_sels'>sels</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="unique?-instance_method">
#<strong>unique?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Whether only one instance of this simple selector is allowed in a given
complex selector.</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">
21
22
23</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/simple.rb', line 21</span>
<span class='kw'>def</span> <span class='id identifier rubyid_unique?'>unique?</span>
<span class='kw'>false</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>