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

2037 lines
54 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::Tree::Node
&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/Tree/Node.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 (N)</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="../Tree.html" title="Sass::Tree (module)">Tree</a></span></span>
&raquo;
<span class="title">Node</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::Tree::Node
</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::Tree::Node</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
<dt class="r2">Includes:</dt>
<dd class="r2">Enumerable</dd>
<dt class="r1 last">Defined in:</dt>
<dd class="r1 last">.ruby-sass/lib/sass/tree/node.rb</dd>
</dl>
<div class="clear"></div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>The abstract superclass of all parse-tree nodes.</p>
</div>
</div>
<div class="tags">
</div><div id="subclasses">
<h2>Direct Known Subclasses</h2>
<p class="children"><span class='object_link'><a href="AtRootNode.html" title="Sass::Tree::AtRootNode (class)">AtRootNode</a></span>, <span class='object_link'><a href="CharsetNode.html" title="Sass::Tree::CharsetNode (class)">CharsetNode</a></span>, <span class='object_link'><a href="CommentNode.html" title="Sass::Tree::CommentNode (class)">CommentNode</a></span>, <span class='object_link'><a href="ContentNode.html" title="Sass::Tree::ContentNode (class)">ContentNode</a></span>, <span class='object_link'><a href="DebugNode.html" title="Sass::Tree::DebugNode (class)">DebugNode</a></span>, <span class='object_link'><a href="DirectiveNode.html" title="Sass::Tree::DirectiveNode (class)">DirectiveNode</a></span>, <span class='object_link'><a href="EachNode.html" title="Sass::Tree::EachNode (class)">EachNode</a></span>, <span class='object_link'><a href="ErrorNode.html" title="Sass::Tree::ErrorNode (class)">ErrorNode</a></span>, <span class='object_link'><a href="ExtendNode.html" title="Sass::Tree::ExtendNode (class)">ExtendNode</a></span>, <span class='object_link'><a href="ForNode.html" title="Sass::Tree::ForNode (class)">ForNode</a></span>, <span class='object_link'><a href="FunctionNode.html" title="Sass::Tree::FunctionNode (class)">FunctionNode</a></span>, <span class='object_link'><a href="IfNode.html" title="Sass::Tree::IfNode (class)">IfNode</a></span>, <span class='object_link'><a href="KeyframeRuleNode.html" title="Sass::Tree::KeyframeRuleNode (class)">KeyframeRuleNode</a></span>, <span class='object_link'><a href="MixinDefNode.html" title="Sass::Tree::MixinDefNode (class)">MixinDefNode</a></span>, <span class='object_link'><a href="MixinNode.html" title="Sass::Tree::MixinNode (class)">MixinNode</a></span>, <span class='object_link'><a href="PropNode.html" title="Sass::Tree::PropNode (class)">PropNode</a></span>, <span class='object_link'><a href="ReturnNode.html" title="Sass::Tree::ReturnNode (class)">ReturnNode</a></span>, <span class='object_link'><a href="RootNode.html" title="Sass::Tree::RootNode (class)">RootNode</a></span>, <span class='object_link'><a href="RuleNode.html" title="Sass::Tree::RuleNode (class)">RuleNode</a></span>, <span class='object_link'><a href="TraceNode.html" title="Sass::Tree::TraceNode (class)">TraceNode</a></span>, <span class='object_link'><a href="VariableNode.html" title="Sass::Tree::VariableNode (class)">VariableNode</a></span>, <span class='object_link'><a href="WarnNode.html" title="Sass::Tree::WarnNode (class)">WarnNode</a></span>, <span class='object_link'><a href="WhileNode.html" title="Sass::Tree::WhileNode (class)">WhileNode</a></span></p>
</div>
<div id="subclasses">
<h2>Direct Known Subclasses</h2>
<p class="children"><span class='object_link'><a href="AtRootNode.html" title="Sass::Tree::AtRootNode (class)">AtRootNode</a></span>, <span class='object_link'><a href="CharsetNode.html" title="Sass::Tree::CharsetNode (class)">CharsetNode</a></span>, <span class='object_link'><a href="CommentNode.html" title="Sass::Tree::CommentNode (class)">CommentNode</a></span>, <span class='object_link'><a href="ContentNode.html" title="Sass::Tree::ContentNode (class)">ContentNode</a></span>, <span class='object_link'><a href="DebugNode.html" title="Sass::Tree::DebugNode (class)">DebugNode</a></span>, <span class='object_link'><a href="DirectiveNode.html" title="Sass::Tree::DirectiveNode (class)">DirectiveNode</a></span>, <span class='object_link'><a href="EachNode.html" title="Sass::Tree::EachNode (class)">EachNode</a></span>, <span class='object_link'><a href="ErrorNode.html" title="Sass::Tree::ErrorNode (class)">ErrorNode</a></span>, <span class='object_link'><a href="ExtendNode.html" title="Sass::Tree::ExtendNode (class)">ExtendNode</a></span>, <span class='object_link'><a href="ForNode.html" title="Sass::Tree::ForNode (class)">ForNode</a></span>, <span class='object_link'><a href="FunctionNode.html" title="Sass::Tree::FunctionNode (class)">FunctionNode</a></span>, <span class='object_link'><a href="IfNode.html" title="Sass::Tree::IfNode (class)">IfNode</a></span>, <span class='object_link'><a href="KeyframeRuleNode.html" title="Sass::Tree::KeyframeRuleNode (class)">KeyframeRuleNode</a></span>, <span class='object_link'><a href="MixinDefNode.html" title="Sass::Tree::MixinDefNode (class)">MixinDefNode</a></span>, <span class='object_link'><a href="MixinNode.html" title="Sass::Tree::MixinNode (class)">MixinNode</a></span>, <span class='object_link'><a href="PropNode.html" title="Sass::Tree::PropNode (class)">PropNode</a></span>, <span class='object_link'><a href="ReturnNode.html" title="Sass::Tree::ReturnNode (class)">ReturnNode</a></span>, <span class='object_link'><a href="RootNode.html" title="Sass::Tree::RootNode (class)">RootNode</a></span>, <span class='object_link'><a href="RuleNode.html" title="Sass::Tree::RuleNode (class)">RuleNode</a></span>, <span class='object_link'><a href="TraceNode.html" title="Sass::Tree::TraceNode (class)">TraceNode</a></span>, <span class='object_link'><a href="VariableNode.html" title="Sass::Tree::VariableNode (class)">VariableNode</a></span>, <span class='object_link'><a href="WarnNode.html" title="Sass::Tree::WarnNode (class)">WarnNode</a></span>, <span class='object_link'><a href="WhileNode.html" title="Sass::Tree::WhileNode (class)">WhileNode</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="#children-instance_method" title="#children (instance method)">#<strong>children</strong> &#x21d2; Array&lt;Tree::Node&gt; </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>The child nodes of this node.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#filename-instance_method" title="#filename (instance method)">#<strong>filename</strong> &#x21d2; String </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>The name of the document on which this node appeared.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#has_children-instance_method" title="#has_children (instance method)">#<strong>has_children</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Whether or not this node has child nodes.</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 document on which this node appeared.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#options-instance_method" title="#options (instance method)">#<strong>options</strong> &#x21d2; {Symbol =&gt; Object} </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>The options hash for the node.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#source_range-instance_method" title="#source_range (instance method)">#<strong>source_range</strong> &#x21d2; Sass::Source::Range </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>The source range in the document on which this node appeared.</p>
</div></span>
</li>
</ul>
<h2>
Class Method Summary
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
</h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#inherited-class_method" title="inherited (class method)">.<strong>inherited</strong>(base) &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'></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="#<<-instance_method" title="#&lt;&lt; (instance method)">#<strong>&lt;&lt;</strong>(child) &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Appends a child to the node.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#==-instance_method" title="#== (instance method)">#<strong>==</strong>(other) &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Compares this node and another object (only other <span class='object_link'><a href="" title="Sass::Tree::Node (class)">Node</a></span>s will be
equal).</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#bubbles%3F-instance_method" title="#bubbles? (instance method)">#<strong>bubbles?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Whether or not this node bubbles up through RuleNodes.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#css-instance_method" title="#css (instance method)">#<strong>css</strong> &#x21d2; String </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Computes the CSS corresponding to this static CSS tree.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#css_with_sourcemap-instance_method" title="#css_with_sourcemap (instance method)">#<strong>css_with_sourcemap</strong> &#x21d2; (String, Sass::Source::Map) </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Computes the CSS corresponding to this static CSS tree, along with the
respective source map.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#deep_copy-instance_method" title="#deep_copy (instance method)">#<strong>deep_copy</strong> &#x21d2; Node </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Return a deep clone of this node.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#each-instance_method" title="#each (instance method)">#<strong>each</strong> {|node| ... } &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Iterates through each node in the tree rooted at this node in a pre-order
walk.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> &#x21d2; Node </a>
</span>
<span class="note title constructor">constructor</span>
<span class="summary_desc"><div class='inline'>
<p>A new instance of Node.</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 representation of the node for debugging purposes.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#invisible%3F-instance_method" title="#invisible? (instance method)">#<strong>invisible?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>True if #to_s will return `nil`; that is, if the node shouldn&#39;t be
rendered.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#style-instance_method" title="#style (instance method)">#<strong>style</strong> &#x21d2; Symbol </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>The output style.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#to_sass-instance_method" title="#to_sass (instance method)">#<strong>to_sass</strong>(options = {}) &#x21d2; String </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Converts a node to Sass code that will generate it.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#to_scss-instance_method" title="#to_scss (instance method)">#<strong>to_scss</strong>(options = {}) &#x21d2; String </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Converts a node to SCSS code that will generate it.</p>
</div></span>
</li>
</ul>
<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> &#x21d2; <tt><span class='object_link'><a href="" title="Sass::Tree::Node (class)">Node</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns a new instance of Node</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
91
92
93
94
95</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 91</span>
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
<span class='ivar'>@children</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='ivar'>@filename</span> <span class='op'>=</span> <span class='kw'>nil</span>
<span class='ivar'>@options</span> <span class='op'>=</span> <span class='kw'>nil</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> &#x21d2; <tt><span class='object_link'><a href="" title="Sass::Tree::Node (class)">Node</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns a new instance of Node</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
91
92
93
94
95</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 91</span>
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
<span class='ivar'>@children</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='ivar'>@filename</span> <span class='op'>=</span> <span class='kw'>nil</span>
<span class='ivar'>@options</span> <span class='op'>=</span> <span class='kw'>nil</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="children=-instance_method"></span>
<div class="method_details first">
<h3 class="signature first" id="children-instance_method">
#<strong>children</strong> &#x21d2; <tt>Array&lt;<span class='object_link'><a href="" title="Sass::Tree::Node (class)">Tree::Node</a></span>&gt;</tt>
</h3><div class="docstring">
<div class="discussion">
<p>The child nodes of this node.</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="" title="Sass::Tree::Node (class)">Tree::Node</a></span>&gt;</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
61
62
63</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 61</span>
<span class='kw'>def</span> <span class='id identifier rubyid_children'>children</span>
<span class='ivar'>@children</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id="filename=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="filename-instance_method">
#<strong>filename</strong> &#x21d2; <tt>String</tt>
</h3><div class="docstring">
<div class="discussion">
<p>The name of the document on which this node appeared.</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">
114
115
116</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 114</span>
<span class='kw'>def</span> <span class='id identifier rubyid_filename'>filename</span>
<span class='ivar'>@filename</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='ivar'>@options</span> <span class='op'>&amp;&amp;</span> <span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:filename</span><span class='rbracket'>]</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id="has_children=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="has_children-instance_method">
#<strong>has_children</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Whether or not this node has child nodes. This may be true even when
<span class='object_link'><a href="#children-instance_method" title="Sass::Tree::Node#children (method)">#children</a></span> is empty, in which case this node has an empty block (e.g.
`{}`).</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">
68
69
70</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 68</span>
<span class='kw'>def</span> <span class='id identifier rubyid_has_children'>has_children</span>
<span class='ivar'>@has_children</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 document on which this node appeared.</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">
73
74
75</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 73</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>
<span id="options=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="options-instance_method">
#<strong>options</strong> &#x21d2; <tt>{Symbol =&gt; Object}</tt>
</h3><div class="docstring">
<div class="discussion">
<p>The options hash for the node. See <a href="../../file.SASS_REFERENCE.html#Options" title="the Sass options documentation">the Sass options documentation</a>.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>{Symbol =&gt; Object}</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
89
90
91</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 89</span>
<span class='kw'>def</span> <span class='id identifier rubyid_options'>options</span>
<span class='ivar'>@options</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id="source_range=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="source_range-instance_method">
#<strong>source_range</strong> &#x21d2; <tt><span class='object_link'><a href="../Source/Range.html" title="Sass::Source::Range (class)">Sass::Source::Range</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>The source range in the document on which this node appeared.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt><span class='object_link'><a href="../Source/Range.html" title="Sass::Source::Range (class)">Sass::Source::Range</a></span></tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
78
79
80</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 78</span>
<span class='kw'>def</span> <span class='id identifier rubyid_source_range'>source_range</span>
<span class='ivar'>@source_range</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
<div id="class_method_details" class="method_details_list">
<h2>Class Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="inherited-class_method">
.<strong>inherited</strong>(base) &#x21d2; <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 33</span>
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_inherited'>inherited</span><span class='lparen'>(</span><span class='id identifier rubyid_base'>base</span><span class='rparen'>)</span>
<span class='id identifier rubyid_node_name'>node_name</span> <span class='op'>=</span> <span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</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'>.*::(.*?)Node$</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>\\1</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span>
<span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_instance_eval'>instance_eval</span> <span class='heredoc_beg'>&lt;&lt;-METHODS</span>
<span class='tstring_content'> # @return [Symbol] The name that is used for this node when visiting.
def node_name
:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node_name'>node_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>
end
# @return [Symbol] The method that is used on the visitor to visit nodes of this type.
def visit_method
:visit_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node_name'>node_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>
end
# @return [Symbol] The method name that determines if the parent is invalid.
def invalid_child_method_name
:&quot;invalid_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node_name'>node_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>_child?&quot;
end
# @return [Symbol] The method name that determines if the node is an invalid parent.
def invalid_parent_method_name
:&quot;invalid_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node_name'>node_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>_parent?&quot;
end
</span><span class='heredoc_end'> METHODS
</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="<<-instance_method">
#<strong>&lt;&lt;</strong>(child) &#x21d2; <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Appends a child to the node.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>child</span>
<span class='type'>(<tt><span class='object_link'><a href="" title="Sass::Tree::Node (class)">Tree::Node</a></span></tt>, <tt>Array&lt;<span class='object_link'><a href="" title="Sass::Tree::Node (class)">Tree::Node</a></span>&gt;</tt>)</span>
&mdash;
<div class='inline'>
<p>The child node or nodes</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 `child` is invalid</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
122
123
124
125
126
127
128
129
130</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 122</span>
<span class='kw'>def</span> <span class='op'>&lt;&lt;</span><span class='lparen'>(</span><span class='id identifier rubyid_child'>child</span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_child'>child</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='kw'>if</span> <span class='id identifier rubyid_child'>child</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span>
<span class='id identifier rubyid_child'>child</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_c'>c</span><span class='op'>|</span> <span class='kw'>self</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_c'>c</span><span class='rbrace'>}</span>
<span class='kw'>else</span>
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_has_children'>has_children</span> <span class='op'>=</span> <span class='kw'>true</span>
<span class='ivar'>@children</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_child'>child</span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="==-instance_method">
#<strong>==</strong>(other) &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Compares this node and another object (only other <span class='object_link'><a href="" title="Sass::Tree::Node (class)">Sass::Tree::Node</a></span>s will be
equal). This does a structural comparison; if the contents of the nodes and
all the child nodes are equivalent, then the nodes are as well.</p>
<p>Only static nodes need to override this.</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 compare with</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 node and the other object are the same</p>
</div>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li><span class='object_link'><a href="../Tree.html" title="Sass::Tree (module)">Sass::Tree</a></span></li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
143
144
145</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 143</span>
<span class='kw'>def</span> <span class='op'>==</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span> <span class='op'>==</span> <span class='id identifier rubyid_other'>other</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_children'>children</span> <span class='op'>==</span> <span class='id identifier rubyid_children'>children</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="bubbles?-instance_method">
#<strong>bubbles?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Whether or not this node bubbles up through RuleNodes.</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">
225
226
227</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 225</span>
<span class='kw'>def</span> <span class='id identifier rubyid_bubbles?'>bubbles?</span>
<span class='kw'>false</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="css-instance_method">
#<strong>css</strong> &#x21d2; <tt>String</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Computes the CSS corresponding to this static CSS tree.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>String</tt>)</span>
&mdash;
<div class='inline'>
<p>The resulting CSS</p>
</div>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li><span class='object_link'><a href="../Tree.html" title="Sass::Tree (module)">Sass::Tree</a></span></li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
165
166
167</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 165</span>
<span class='kw'>def</span> <span class='id identifier rubyid_css'>css</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="../Tree.html" title="Sass::Tree (module)">Tree</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Visitors.html" title="Sass::Tree::Visitors (module)">Visitors</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Visitors/ToCss.html" title="Sass::Tree::Visitors::ToCss (class)">ToCss</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Visitors/ToCss.html#initialize-instance_method" title="Sass::Tree::Visitors::ToCss#initialize (method)">new</a></span></span><span class='period'>.</span><span class='id identifier rubyid_visit'><span class='object_link'><a href="Visitors/ToCss.html#visit-instance_method" title="Sass::Tree::Visitors::ToCss#visit (method)">visit</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="css_with_sourcemap-instance_method">
#<strong>css_with_sourcemap</strong> &#x21d2; <tt>(String, <span class='object_link'><a href="../Source/Map.html" title="Sass::Source::Map (class)">Sass::Source::Map</a></span>)</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Computes the CSS corresponding to this static CSS tree, along with the
respective source map.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>(String, <span class='object_link'><a href="../Source/Map.html" title="Sass::Source::Map (class)">Sass::Source::Map</a></span>)</tt>)</span>
&mdash;
<div class='inline'>
<p>The resulting CSS and the source map</p>
</div>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li><span class='object_link'><a href="../Tree.html" title="Sass::Tree (module)">Sass::Tree</a></span></li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
174
175
176
177
178</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 174</span>
<span class='kw'>def</span> <span class='id identifier rubyid_css_with_sourcemap'>css_with_sourcemap</span>
<span class='id identifier rubyid_visitor'>visitor</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="../Tree.html" title="Sass::Tree (module)">Tree</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Visitors.html" title="Sass::Tree::Visitors (module)">Visitors</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Visitors/ToCss.html" title="Sass::Tree::Visitors::ToCss (class)">ToCss</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Visitors/ToCss.html#initialize-instance_method" title="Sass::Tree::Visitors::ToCss#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='symbol'>:build_source_mapping</span><span class='rparen'>)</span>
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_visitor'>visitor</span><span class='period'>.</span><span class='id identifier rubyid_visit'>visit</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='id identifier rubyid_result'>result</span><span class='comma'>,</span> <span class='id identifier rubyid_visitor'>visitor</span><span class='period'>.</span><span class='id identifier rubyid_source_mapping'>source_mapping</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="deep_copy-instance_method">
#<strong>deep_copy</strong> &#x21d2; <tt><span class='object_link'><a href="" title="Sass::Tree::Node (class)">Node</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Return a deep clone of this node. The child nodes are cloned, but options
are not.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt><span class='object_link'><a href="" title="Sass::Tree::Node (class)">Node</a></span></tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
218
219
220</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 218</span>
<span class='kw'>def</span> <span class='id identifier rubyid_deep_copy'>deep_copy</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="../Tree.html" title="Sass::Tree (module)">Tree</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Visitors.html" title="Sass::Tree::Visitors (module)">Visitors</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Visitors/DeepCopy.html" title="Sass::Tree::Visitors::DeepCopy (class)">DeepCopy</a></span></span><span class='period'>.</span><span class='id identifier rubyid_visit'>visit</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="each-instance_method">
#<strong>each</strong> {|node| ... } &#x21d2; <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Iterates through each node in the tree rooted at this node in a pre-order
walk.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Yields:</p>
<ul class="yield">
<li>
<span class='type'></span>
<div class='inline'>
<p>node</p>
</div>
</li>
</ul>
<p class="tag_title">Yield Parameters:</p>
<ul class="yieldparam">
<li>
<span class='name'>node</span>
<span class='type'>(<tt><span class='object_link'><a href="" title="Sass::Tree::Node (class)">Node</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>a node in the tree</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
193
194
195
196</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 193</span>
<span class='kw'>def</span> <span class='id identifier rubyid_each'>each</span>
<span class='kw'>yield</span> <span class='kw'>self</span>
<span class='id identifier rubyid_children'>children</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_c'>c</span><span class='op'>|</span> <span class='id identifier rubyid_c'>c</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_n'>n</span><span class='op'>|</span> <span class='kw'>yield</span> <span class='id identifier rubyid_n'>n</span><span class='rbrace'>}</span><span class='rbrace'>}</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 representation of the node for debugging purposes.</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">
183
184
185
186</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 183</span>
<span class='kw'>def</span> <span class='id identifier rubyid_inspect'>inspect</span>
<span class='kw'>return</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='kw'>unless</span> <span class='id identifier rubyid_has_children'>has_children</span>
<span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_children'>children</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_c'>c</span><span class='op'>|</span> <span class='id identifier rubyid_c'>c</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'>&#39;</span><span class='tstring_content'> </span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>&quot;</span></span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="invisible?-instance_method">
#<strong>invisible?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
<p>True if #to_s will return `nil`; that is, if the node shouldn&#39;t be
rendered. Should only be called in a static tree.</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">
152</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 152</span>
<span class='kw'>def</span> <span class='id identifier rubyid_invisible?'>invisible?</span><span class='semicolon'>;</span> <span class='kw'>false</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="style-instance_method">
#<strong>style</strong> &#x21d2; <tt>Symbol</tt>
</h3><div class="docstring">
<div class="discussion">
<p>The output style. See <a href="../../file.SASS_REFERENCE.html#Options" title="the Sass options documentation">the Sass options documentation</a>.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Symbol</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
157
158
159</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 157</span>
<span class='kw'>def</span> <span class='id identifier rubyid_style'>style</span>
<span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:style</span><span class='rbracket'>]</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="to_sass-instance_method">
#<strong>to_sass</strong>(options = {}) &#x21d2; <tt>String</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Converts a node to Sass code that will generate it.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>options</span>
<span class='type'>(<tt>{Symbol =&gt; Object}</tt>)</span>
<em class="default">(defaults to: <tt>{}</tt>)</em>
&mdash;
<div class='inline'>
<p>An options hash (see <span class='object_link'><a href="../CSS.html#initialize-instance_method" title="Sass::CSS#initialize (method)">CSS#initialize</a></span>)</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>String</tt>)</span>
&mdash;
<div class='inline'>
<p>The Sass code corresponding to the node</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
202
203
204</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 202</span>
<span class='kw'>def</span> <span class='id identifier rubyid_to_sass'>to_sass</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</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="../Tree.html" title="Sass::Tree (module)">Tree</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Visitors.html" title="Sass::Tree::Visitors (module)">Visitors</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Visitors/Convert.html" title="Sass::Tree::Visitors::Convert (class)">Convert</a></span></span><span class='period'>.</span><span class='id identifier rubyid_visit'><span class='object_link'><a href="Visitors/Convert.html#visit-class_method" title="Sass::Tree::Visitors::Convert.visit (method)">visit</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='symbol'>:sass</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="to_scss-instance_method">
#<strong>to_scss</strong>(options = {}) &#x21d2; <tt>String</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Converts a node to SCSS code that will generate it.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>options</span>
<span class='type'>(<tt>{Symbol =&gt; Object}</tt>)</span>
<em class="default">(defaults to: <tt>{}</tt>)</em>
&mdash;
<div class='inline'>
<p>An options hash (see <span class='object_link'><a href="../CSS.html#initialize-instance_method" title="Sass::CSS#initialize (method)">CSS#initialize</a></span>)</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>String</tt>)</span>
&mdash;
<div class='inline'>
<p>The Sass code corresponding to the node</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
210
211
212</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/node.rb', line 210</span>
<span class='kw'>def</span> <span class='id identifier rubyid_to_scss'>to_scss</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</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="../Tree.html" title="Sass::Tree (module)">Tree</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Visitors.html" title="Sass::Tree::Visitors (module)">Visitors</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Visitors/Convert.html" title="Sass::Tree::Visitors::Convert (class)">Convert</a></span></span><span class='period'>.</span><span class='id identifier rubyid_visit'><span class='object_link'><a href="Visitors/Convert.html#visit-class_method" title="Sass::Tree::Visitors::Convert.visit (method)">visit</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='symbol'>:scss</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:59 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>