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

281 lines
9.1 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::Visitors::Base
&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/Visitors/Base.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 (B)</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'><span class='object_link'><a href="../Visitors.html" title="Sass::Tree::Visitors (module)">Visitors</a></span></span>
&raquo;
<span class="title">Base</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::Visitors::Base
<span class="abstract note title">Abstract</span>
</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::Visitors::Base</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/tree/visitors/base.rb</dd>
</dl>
<div class="clear"></div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<div class="note abstract">
<strong>This class is abstract.</strong>
<div class='inline'></div>
</div>
<p>The abstract base class for Sass visitors. Visitors should extend this
class, then implement `visit_*` methods for each node they care about (e.g.
`visit_rule` for <span class='object_link'><a href="../RuleNode.html" title="Sass::Tree::RuleNode (class)">RuleNode</a></span> or `visit_for` for <span class='object_link'><a href="../ForNode.html" title="Sass::Tree::ForNode (class)">ForNode</a></span>). These methods
take the node in question as argument. They may `yield` to visit the child
nodes of the current node.</p>
<p><strong>Note</strong>: due to the unusual nature of <span class='object_link'><a href="../IfNode.html" title="Sass::Tree::IfNode (class)">IfNode</a></span>,
special care must be taken to ensure that it is properly handled. In
particular, there is no built-in scaffolding for dealing with the return
value of `@else` 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="CheckNesting.html" title="Sass::Tree::Visitors::CheckNesting (class)">CheckNesting</a></span>, <span class='object_link'><a href="Convert.html" title="Sass::Tree::Visitors::Convert (class)">Convert</a></span>, <span class='object_link'><a href="Cssize.html" title="Sass::Tree::Visitors::Cssize (class)">Cssize</a></span>, <span class='object_link'><a href="DeepCopy.html" title="Sass::Tree::Visitors::DeepCopy (class)">DeepCopy</a></span>, <span class='object_link'><a href="Extend.html" title="Sass::Tree::Visitors::Extend (class)">Extend</a></span>, <span class='object_link'><a href="Perform.html" title="Sass::Tree::Visitors::Perform (class)">Perform</a></span>, <span class='object_link'><a href="SetOptions.html" title="Sass::Tree::Visitors::SetOptions (class)">SetOptions</a></span>, <span class='object_link'><a href="ToCss.html" title="Sass::Tree::Visitors::ToCss (class)">ToCss</a></span></p>
</div>
<div id="subclasses">
<h2>Direct Known Subclasses</h2>
<p class="children"><span class='object_link'><a href="CheckNesting.html" title="Sass::Tree::Visitors::CheckNesting (class)">CheckNesting</a></span>, <span class='object_link'><a href="Convert.html" title="Sass::Tree::Visitors::Convert (class)">Convert</a></span>, <span class='object_link'><a href="Cssize.html" title="Sass::Tree::Visitors::Cssize (class)">Cssize</a></span>, <span class='object_link'><a href="DeepCopy.html" title="Sass::Tree::Visitors::DeepCopy (class)">DeepCopy</a></span>, <span class='object_link'><a href="Extend.html" title="Sass::Tree::Visitors::Extend (class)">Extend</a></span>, <span class='object_link'><a href="Perform.html" title="Sass::Tree::Visitors::Perform (class)">Perform</a></span>, <span class='object_link'><a href="SetOptions.html" title="Sass::Tree::Visitors::SetOptions (class)">SetOptions</a></span>, <span class='object_link'><a href="ToCss.html" title="Sass::Tree::Visitors::ToCss (class)">ToCss</a></span></p>
</div>
<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="#visit-class_method" title="visit (class method)">.<strong>visit</strong>(root) &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Runs the visitor on a tree.</p>
</div></span>
</li>
</ul>
<div id="class_method_details" class="method_details_list">
<h2>Class Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="visit-class_method">
.<strong>visit</strong>(root) &#x21d2; <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Runs the visitor on a tree.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>root</span>
<span class='type'>(<tt><span class='object_link'><a href="../Node.html" title="Sass::Tree::Node (class)">Tree::Node</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>The root node of the Sass tree.</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Object</tt>)</span>
&mdash;
<div class='inline'>
<p>The return value of <span class='object_link'>#visit</span> for the root node.</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
23
24
25</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/visitors/base.rb', line 23</span>
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_visit'>visit</span><span class='lparen'>(</span><span class='id identifier rubyid_root'><span class='object_link'><a href="../../../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_new'>new</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='symbol'>:visit</span><span class='comma'>,</span> <span class='id identifier rubyid_root'><span class='object_link'><a href="../../../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></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>