mirror of
https://github.com/danog/sass-site.git
synced 2025-01-08 14:08:45 +01:00
508 lines
17 KiB
HTML
508 lines
17 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::ReadOnlyEnvironment
|
|
|
|
— 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/ReadOnlyEnvironment.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 (R)</a> »
|
|
<span class='title'><span class='object_link'><a href="../Sass.html" title="Sass (module)">Sass</a></span></span>
|
|
»
|
|
<span class="title">ReadOnlyEnvironment</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::ReadOnlyEnvironment
|
|
|
|
|
|
|
|
</h1>
|
|
|
|
<dl class="box">
|
|
|
|
<dt class="r1">Inherits:</dt>
|
|
<dd class="r1">
|
|
<span class="inheritName"><span class='object_link'><a href="BaseEnvironment.html" title="Sass::BaseEnvironment (class)">BaseEnvironment</a></span></span>
|
|
|
|
<ul class="fullTree">
|
|
<li>Object</li>
|
|
|
|
<li class="next"><span class='object_link'><a href="BaseEnvironment.html" title="Sass::BaseEnvironment (class)">BaseEnvironment</a></span></li>
|
|
|
|
<li class="next">Sass::ReadOnlyEnvironment</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/environment.rb</dd>
|
|
|
|
</dl>
|
|
<div class="clear"></div>
|
|
|
|
<h2>Overview</h2><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>A read-only wrapper for a lexical environment for SassScript.</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h2>Instance Attribute Summary</h2>
|
|
|
|
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="BaseEnvironment.html" title="Sass::BaseEnvironment (class)">BaseEnvironment</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="BaseEnvironment.html#options-instance_method" title="Sass::BaseEnvironment#options (method)">#options</a></span>, <span class='object_link'><a href="BaseEnvironment.html#selector-instance_method" title="Sass::BaseEnvironment#selector (method)">#selector</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="#caller-instance_method" title="#caller (instance method)">#<strong>caller</strong> ⇒ ReadOnlyEnvironment </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>The read-only environment of the caller of this environment's mixin or
|
|
function.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#content-instance_method" title="#content (instance method)">#<strong>content</strong> ⇒ [Array<Sass::Tree::Node>, ReadOnlyEnvironment]? </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>The content passed to this environment.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(parent = nil, options = nil) ⇒ ReadOnlyEnvironment </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
<span class="note title constructor">constructor</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>A new instance of ReadOnlyEnvironment.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="BaseEnvironment.html" title="Sass::BaseEnvironment (class)">BaseEnvironment</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="BaseEnvironment.html#global%3F-instance_method" title="Sass::BaseEnvironment#global? (method)">#global?</a></span>, <span class='object_link'><a href="BaseEnvironment.html#global_env-instance_method" title="Sass::BaseEnvironment#global_env (method)">#global_env</a></span>, <span class='object_link'><a href="BaseEnvironment.html#inherited_hash_accessor-class_method" title="Sass::BaseEnvironment.inherited_hash_accessor (method)">inherited_hash_accessor</a></span>, <span class='object_link'><a href="BaseEnvironment.html#inherited_hash_reader-class_method" title="Sass::BaseEnvironment.inherited_hash_reader (method)">inherited_hash_reader</a></span>, <span class='object_link'><a href="BaseEnvironment.html#inherited_hash_writer-class_method" title="Sass::BaseEnvironment.inherited_hash_writer (method)">inherited_hash_writer</a></span>, <span class='object_link'><a href="BaseEnvironment.html#stack-instance_method" title="Sass::BaseEnvironment#stack (method)">#stack</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>(parent = nil, options = nil) ⇒ <tt><span class='object_link'><a href="" title="Sass::ReadOnlyEnvironment (class)">ReadOnlyEnvironment</a></span></tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Returns a new instance of ReadOnlyEnvironment</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
178
|
|
179
|
|
180
|
|
181</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/environment.rb', line 178</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_parent'>parent</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
|
<span class='kw'>super</span>
|
|
<span class='ivar'>@content_cached</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>(parent = nil, options = nil) ⇒ <tt><span class='object_link'><a href="" title="Sass::ReadOnlyEnvironment (class)">ReadOnlyEnvironment</a></span></tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Returns a new instance of ReadOnlyEnvironment</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
178
|
|
179
|
|
180
|
|
181</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/environment.rb', line 178</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_parent'>parent</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
|
<span class='kw'>super</span>
|
|
<span class='ivar'>@content_cached</span> <span class='op'>=</span> <span class='kw'>nil</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="caller-instance_method">
|
|
|
|
#<strong>caller</strong> ⇒ <tt><span class='object_link'><a href="" title="Sass::ReadOnlyEnvironment (class)">ReadOnlyEnvironment</a></span></tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>The read-only environment of the caller of this environment's mixin or
|
|
function.</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::ReadOnlyEnvironment (class)">ReadOnlyEnvironment</a></span></tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">See Also:</p>
|
|
<ul class="see">
|
|
|
|
<li><span class='object_link'><a href="BaseEnvironment.html#caller-instance_method" title="Sass::BaseEnvironment#caller (method)">BaseEnvironment#caller</a></span></li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
186
|
|
187
|
|
188
|
|
189
|
|
190</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/environment.rb', line 186</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_caller'>caller</span>
|
|
<span class='kw'>return</span> <span class='ivar'>@caller</span> <span class='kw'>if</span> <span class='ivar'>@caller</span>
|
|
<span class='id identifier rubyid_env'>env</span> <span class='op'>=</span> <span class='kw'>super</span>
|
|
<span class='ivar'>@caller</span> <span class='op'>||=</span> <span class='id identifier rubyid_env'>env</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::ReadOnlyEnvironment (class)">ReadOnlyEnvironment</a></span></span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_env'>env</span> <span class='op'>:</span> <span class='const'><span class='object_link'><a href="" title="Sass::ReadOnlyEnvironment (class)">ReadOnlyEnvironment</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Sass::ReadOnlyEnvironment#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='comma'>,</span> <span class='id identifier rubyid_env'>env</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="content-instance_method">
|
|
|
|
#<strong>content</strong> ⇒ <tt>[Array<<span class='object_link'><a href="Tree/Node.html" title="Sass::Tree::Node (class)">Sass::Tree::Node</a></span>>, <span class='object_link'><a href="" title="Sass::ReadOnlyEnvironment (class)">ReadOnlyEnvironment</a></span>]?</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>The content passed to this environment. If the content's environment
|
|
isn't already read-only, it's made read-only.</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt>[Array<<span class='object_link'><a href="Tree/Node.html" title="Sass::Tree::Node (class)">Sass::Tree::Node</a></span>>, <span class='object_link'><a href="" title="Sass::ReadOnlyEnvironment (class)">ReadOnlyEnvironment</a></span>]?</tt>)</span>
|
|
|
|
|
|
|
|
—
|
|
<div class='inline'>
|
|
<p>The content nodes and the lexical environment of the content block. Returns
|
|
`nil` when there is no content in this environment.</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">See Also:</p>
|
|
<ul class="see">
|
|
|
|
<li><span class='object_link'><a href="BaseEnvironment.html#content-instance_method" title="Sass::BaseEnvironment#content (method)">BaseEnvironment#content</a></span></li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
200
|
|
201
|
|
202
|
|
203
|
|
204
|
|
205
|
|
206
|
|
207
|
|
208
|
|
209
|
|
210
|
|
211
|
|
212
|
|
213
|
|
214
|
|
215
|
|
216
|
|
217</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/environment.rb', line 200</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_content'>content</span>
|
|
<span class='comment'># Return the cached content from a previous invocation if any
|
|
</span> <span class='kw'>return</span> <span class='ivar'>@content</span> <span class='kw'>if</span> <span class='ivar'>@content_cached</span>
|
|
<span class='comment'># get the content with a read-write environment from the superclass
|
|
</span> <span class='id identifier rubyid_read_write_content'>read_write_content</span> <span class='op'>=</span> <span class='kw'>super</span>
|
|
<span class='kw'>if</span> <span class='id identifier rubyid_read_write_content'>read_write_content</span>
|
|
<span class='id identifier rubyid_tree'>tree</span><span class='comma'>,</span> <span class='id identifier rubyid_env'>env</span> <span class='op'>=</span> <span class='id identifier rubyid_read_write_content'>read_write_content</span>
|
|
<span class='comment'># make the content's environment read-only
|
|
</span> <span class='kw'>if</span> <span class='id identifier rubyid_env'>env</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_env'>env</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::ReadOnlyEnvironment (class)">ReadOnlyEnvironment</a></span></span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_env'>env</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="Sass::ReadOnlyEnvironment (class)">ReadOnlyEnvironment</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Sass::ReadOnlyEnvironment#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='comma'>,</span> <span class='id identifier rubyid_env'>env</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
|
<span class='kw'>end</span>
|
|
<span class='ivar'>@content_cached</span> <span class='op'>=</span> <span class='kw'>true</span>
|
|
<span class='ivar'>@content</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_tree'>tree</span><span class='comma'>,</span> <span class='id identifier rubyid_env'>env</span><span class='rbracket'>]</span>
|
|
<span class='kw'>else</span>
|
|
<span class='ivar'>@content_cached</span> <span class='op'>=</span> <span class='kw'>true</span>
|
|
<span class='ivar'>@content</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
|
<span class='kw'>end</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="footer">
|
|
Generated on Mon Oct 22 13:20:51 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> |