Deploying to gh-pages from @ 48b15b9bf8 🚀

This commit is contained in:
Sija 2021-10-19 09:45:33 +00:00
parent 42809c9681
commit f760465482
106 changed files with 5612 additions and 4623 deletions

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.36.1">
<meta name="generator" content="Crystal Docs 1.1.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -286,6 +286,11 @@
<ul>
<li class=" " data-id="ameba/Ameba/Rule/Lint/AmbiguousAssignment" data-name="ameba::rule::lint::ambiguousassignment">
<a href="../../Ameba/Rule/Lint/AmbiguousAssignment.html">AmbiguousAssignment</a>
</li>
<li class=" " data-id="ameba/Ameba/Rule/Lint/BadDirective" data-name="ameba::rule::lint::baddirective">
<a href="../../Ameba/Rule/Lint/BadDirective.html">BadDirective</a>
@ -665,7 +670,7 @@ This is where the local variables belong to.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L6" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L6" target="_blank">
ameba/ast/scope.cr
</a>
@ -687,7 +692,7 @@ This is where the local variables belong to.</p>
<ul class="list-summary">
<li class="entry-summary">
<a href="#new(node,outer_scope=nil)-class-method" class="signature"><strong>.new</strong>(node, outer_scope = <span class="n">nil</span>)</a>
<a href="#new%28node%2Couter_scope%3Dnil%29-class-method" class="signature"><strong>.new</strong>(node, outer_scope = <span class="n">nil</span>)</a>
<div class="summary"><p>Creates a new scope.</p></div>
@ -710,198 +715,198 @@ This is where the local variables belong to.</p>
<ul class="list-summary">
<li class="entry-summary">
<a href="#==(other:self)-instance-method" class="signature"><strong>#==</strong>(other : <span class="k">self</span>)</a>
<a href="#%3D%3D%28other%3Aself%29-instance-method" class="signature"><strong>#==</strong>(other : <span class="k">self</span>)</a>
<div class="summary"><p>Returns <code>true</code> if this reference is the same as <em>other</em>.</p></div>
</li>
<li class="entry-summary">
<a href="#add_argument(node)-instance-method" class="signature"><strong>#add_argument</strong>(node)</a>
<a href="#add_argument%28node%29-instance-method" class="signature"><strong>#add_argument</strong>(node)</a>
<div class="summary"><p>Creates a new argument in the current scope.</p></div>
</li>
<li class="entry-summary">
<a href="#add_ivariable(node)-instance-method" class="signature"><strong>#add_ivariable</strong>(node)</a>
<a href="#add_ivariable%28node%29-instance-method" class="signature"><strong>#add_ivariable</strong>(node)</a>
<div class="summary"><p>Adds a new instance variable to the current scope.</p></div>
</li>
<li class="entry-summary">
<a href="#add_variable(node)-instance-method" class="signature"><strong>#add_variable</strong>(node)</a>
<a href="#add_variable%28node%29-instance-method" class="signature"><strong>#add_variable</strong>(node)</a>
<div class="summary"><p>Creates a new variable in the current scope.</p></div>
</li>
<li class="entry-summary">
<a href="#arg?(var)-instance-method" class="signature"><strong>#arg?</strong>(var)</a>
<a href="#arg%3F%28var%29-instance-method" class="signature"><strong>#arg?</strong>(var)</a>
<div class="summary"><p>Returns true if var is an argument in current scope, false if not.</p></div>
</li>
<li class="entry-summary">
<a href="#arguments:Array(Ameba::AST::Argument)-instance-method" class="signature"><strong>#arguments</strong> : Array(Ameba::AST::Argument)</a>
<a href="#arguments%3AArray%28Ameba%3A%3AAST%3A%3AArgument%29-instance-method" class="signature"><strong>#arguments</strong> : Array(Ameba::AST::Argument)</a>
<div class="summary"><p>Link to the arguments in current scope</p></div>
</li>
<li class="entry-summary">
<a href="#assign_variable(name,node)-instance-method" class="signature"><strong>#assign_variable</strong>(name, node)</a>
<a href="#assign_variable%28name%2Cnode%29-instance-method" class="signature"><strong>#assign_variable</strong>(name, node)</a>
<div class="summary"><p>Creates a new assignment for the variable.</p></div>
</li>
<li class="entry-summary">
<a href="#assigns_ivar?(name)-instance-method" class="signature"><strong>#assigns_ivar?</strong>(name)</a>
<a href="#assigns_ivar%3F%28name%29-instance-method" class="signature"><strong>#assigns_ivar?</strong>(name)</a>
<div class="summary"><p>Returns true instance variable assinged in this scope.</p></div>
</li>
<li class="entry-summary">
<a href="#block?-instance-method" class="signature"><strong>#block?</strong></a>
<a href="#block%3F-instance-method" class="signature"><strong>#block?</strong></a>
<div class="summary"><p>Returns true if current scope represents a block (or proc), false if not.</p></div>
</li>
<li class="entry-summary">
<a href="#def?-instance-method" class="signature"><strong>#def?</strong></a>
<a href="#def%3F-instance-method" class="signature"><strong>#def?</strong></a>
<div class="summary"><p>Returns true if current scope is a def, false if not.</p></div>
</li>
<li class="entry-summary">
<a href="#end_location(*args,**options)-instance-method" class="signature"><strong>#end_location</strong>(*args, **options)</a>
<a href="#end_location%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#end_location</strong>(*args, **options)</a>
</li>
<li class="entry-summary">
<a href="#end_location(*args,**options,&)-instance-method" class="signature"><strong>#end_location</strong>(*args, **options, &)</a>
<a href="#end_location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#end_location</strong>(*args, **options, &)</a>
</li>
<li class="entry-summary">
<a href="#eql?(node)-instance-method" class="signature"><strong>#eql?</strong>(node)</a>
<a href="#eql%3F%28node%29-instance-method" class="signature"><strong>#eql?</strong>(node)</a>
<div class="summary"><p>Returns true if the <code><a href="../../Ameba/AST/Scope.html#node:Crystal::ASTNode-instance-method">#node</a></code> represents exactly the same Crystal node as <code>@node</code>.</p></div>
<div class="summary"><p>Returns true if the <code><a href="../../Ameba/AST/Scope.html#node%3ACrystal%3A%3AASTNode-instance-method">#node</a></code> represents exactly the same Crystal node as <code>@node</code>.</p></div>
</li>
<li class="entry-summary">
<a href="#find_variable(name:String)-instance-method" class="signature"><strong>#find_variable</strong>(name : String)</a>
<a href="#find_variable%28name%3AString%29-instance-method" class="signature"><strong>#find_variable</strong>(name : String)</a>
<div class="summary"><p>Returns variable by its name or nil if it does not exist.</p></div>
</li>
<li class="entry-summary">
<a href="#hash(hasher)-instance-method" class="signature"><strong>#hash</strong>(hasher)</a>
<a href="#hash%28hasher%29-instance-method" class="signature"><strong>#hash</strong>(hasher)</a>
<div class="summary"><p>See <code>Object#hash(hasher)</code></p></div>
</li>
<li class="entry-summary">
<a href="#in_macro?-instance-method" class="signature"><strong>#in_macro?</strong></a>
<a href="#in_macro%3F-instance-method" class="signature"><strong>#in_macro?</strong></a>
<div class="summary"><p>Returns true if current scope sits inside a macro.</p></div>
</li>
<li class="entry-summary">
<a href="#inner_scopes:Array(Ameba::AST::Scope)-instance-method" class="signature"><strong>#inner_scopes</strong> : Array(Ameba::AST::Scope)</a>
<a href="#inner_scopes%3AArray%28Ameba%3A%3AAST%3A%3AScope%29-instance-method" class="signature"><strong>#inner_scopes</strong> : Array(Ameba::AST::Scope)</a>
<div class="summary"><p>List of inner scopes</p></div>
</li>
<li class="entry-summary">
<a href="#ivariables:Array(Ameba::AST::InstanceVariable)-instance-method" class="signature"><strong>#ivariables</strong> : Array(Ameba::AST::InstanceVariable)</a>
<a href="#ivariables%3AArray%28Ameba%3A%3AAST%3A%3AInstanceVariable%29-instance-method" class="signature"><strong>#ivariables</strong> : Array(Ameba::AST::InstanceVariable)</a>
<div class="summary"><p>Link to the instance variables used in current scope</p></div>
</li>
<li class="entry-summary">
<a href="#location(*args,**options,&)-instance-method" class="signature"><strong>#location</strong>(*args, **options, &)</a>
<a href="#location%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#location</strong>(*args, **options)</a>
</li>
<li class="entry-summary">
<a href="#location(*args,**options)-instance-method" class="signature"><strong>#location</strong>(*args, **options)</a>
<a href="#location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#location</strong>(*args, **options, &)</a>
</li>
<li class="entry-summary">
<a href="#node:Crystal::ASTNode-instance-method" class="signature"><strong>#node</strong> : Crystal::ASTNode</a>
<a href="#node%3ACrystal%3A%3AASTNode-instance-method" class="signature"><strong>#node</strong> : Crystal::ASTNode</a>
<div class="summary"><p>The actual AST node that represents a current scope.</p></div>
</li>
<li class="entry-summary">
<a href="#outer_scope:Scope?-instance-method" class="signature"><strong>#outer_scope</strong> : Scope?</a>
<a href="#outer_scope%3AScope%3F-instance-method" class="signature"><strong>#outer_scope</strong> : Scope?</a>
<div class="summary"><p>Link to the outer scope</p></div>
</li>
<li class="entry-summary">
<a href="#references:Array(Ameba::AST::Reference)-instance-method" class="signature"><strong>#references</strong> : Array(Ameba::AST::Reference)</a>
<a href="#references%3AArray%28Ameba%3A%3AAST%3A%3AReference%29-instance-method" class="signature"><strong>#references</strong> : Array(Ameba::AST::Reference)</a>
<div class="summary"><p>Link to all variable references in currency scope</p></div>
</li>
<li class="entry-summary">
<a href="#references?(variable:Variable,check_inner_scopes=true)-instance-method" class="signature"><strong>#references?</strong>(variable : Variable, check_inner_scopes = <span class="n">true</span>)</a>
<a href="#references%3F%28variable%3AVariable%2Ccheck_inner_scopes%3Dtrue%29-instance-method" class="signature"><strong>#references?</strong>(variable : Variable, check_inner_scopes = <span class="n">true</span>)</a>
<div class="summary"><p>Returns true if current scope (or any of inner scopes) references variable, false if not.</p></div>
</li>
<li class="entry-summary">
<a href="#spawn_block?-instance-method" class="signature"><strong>#spawn_block?</strong></a>
<a href="#spawn_block%3F-instance-method" class="signature"><strong>#spawn_block?</strong></a>
<div class="summary"><p>Returns true if current scope represents a spawn block, e.</p></div>
</li>
<li class="entry-summary">
<a href="#to_s(*args,**options)-instance-method" class="signature"><strong>#to_s</strong>(*args, **options)</a>
<a href="#to_s%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#to_s</strong>(*args, **options)</a>
</li>
<li class="entry-summary">
<a href="#to_s(*args,**options,&)-instance-method" class="signature"><strong>#to_s</strong>(*args, **options, &)</a>
<a href="#to_s%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method" class="signature"><strong>#to_s</strong>(*args, **options, &)</a>
</li>
<li class="entry-summary">
<a href="#top_level?-instance-method" class="signature"><strong>#top_level?</strong></a>
<a href="#top_level%3F-instance-method" class="signature"><strong>#top_level?</strong></a>
<div class="summary"><p>Returns true if this scope is a top level scope, false if not.</p></div>
</li>
<li class="entry-summary">
<a href="#type_definition?-instance-method" class="signature"><strong>#type_definition?</strong></a>
<a href="#type_definition%3F-instance-method" class="signature"><strong>#type_definition?</strong></a>
<div class="summary"><p>Returns true if and only if current scope represents some type definition, for example a class.</p></div>
</li>
<li class="entry-summary">
<a href="#variables:Array(Ameba::AST::Variable)-instance-method" class="signature"><strong>#variables</strong> : Array(Ameba::AST::Variable)</a>
<a href="#variables%3AArray%28Ameba%3A%3AAST%3A%3AVariable%29-instance-method" class="signature"><strong>#variables</strong> : Array(Ameba::AST::Variable)</a>
<div class="summary"><p>Link to local variables</p></div>
@ -952,20 +957,19 @@ This is where the local variables belong to.</p>
def self.<strong>new</strong>(node, outer_scope = <span class="n">nil</span>)
<a class="method-permalink" href="#new(node,outer_scope=nil)-class-method">#</a>
<a class="method-permalink" href="#new%28node%2Couter_scope%3Dnil%29-class-method">#</a>
</div>
<div class="doc">
<p>Creates a new scope. Accepts the AST node and the outer scope.</p>
<pre><code class="language-crystal">scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L39" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L39" target="_blank">View source</a>]
</div>
</div>
@ -989,7 +993,7 @@ This is where the local variables belong to.</p>
def <strong>==</strong>(other : <span class="k">self</span>)
<a class="method-permalink" href="#==(other:self)-instance-method">#</a>
<a class="method-permalink" href="#%3D%3D%28other%3Aself%29-instance-method">#</a>
</div>
<div class="doc">
@ -1012,13 +1016,12 @@ This is where the local variables belong to.</p>
def <strong>add_argument</strong>(node)
<a class="method-permalink" href="#add_argument(node)-instance-method">#</a>
<a class="method-permalink" href="#add_argument%28node%29-instance-method">#</a>
</div>
<div class="doc">
<p>Creates a new argument in the current scope.</p>
<pre><code class="language-crystal">scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
scope.add_argument(arg_node)</code></pre>
</div>
@ -1026,7 +1029,7 @@ scope.add_argument(arg_node)</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L59" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L59" target="_blank">View source</a>]
</div>
</div>
@ -1036,13 +1039,12 @@ scope.add_argument(arg_node)</code></pre>
def <strong>add_ivariable</strong>(node)
<a class="method-permalink" href="#add_ivariable(node)-instance-method">#</a>
<a class="method-permalink" href="#add_ivariable%28node%29-instance-method">#</a>
</div>
<div class="doc">
<p>Adds a new instance variable to the current scope.</p>
<pre><code class="language-crystal">scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
scope.add_ivariable(ivar_node)</code></pre>
</div>
@ -1050,7 +1052,7 @@ scope.add_ivariable(ivar_node)</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L70" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L70" target="_blank">View source</a>]
</div>
</div>
@ -1060,13 +1062,12 @@ scope.add_ivariable(ivar_node)</code></pre>
def <strong>add_variable</strong>(node)
<a class="method-permalink" href="#add_variable(node)-instance-method">#</a>
<a class="method-permalink" href="#add_variable%28node%29-instance-method">#</a>
</div>
<div class="doc">
<p>Creates a new variable in the current scope.</p>
<pre><code class="language-crystal">scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
scope.add_variable(var_node)</code></pre>
</div>
@ -1074,7 +1075,7 @@ scope.add_variable(var_node)</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L49" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L49" target="_blank">View source</a>]
</div>
</div>
@ -1084,7 +1085,7 @@ scope.add_variable(var_node)</code></pre>
def <strong>arg?</strong>(var)
<a class="method-permalink" href="#arg?(var)-instance-method">#</a>
<a class="method-permalink" href="#arg%3F%28var%29-instance-method">#</a>
</div>
<div class="doc">
@ -1095,7 +1096,7 @@ scope.add_variable(var_node)</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L155" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L155" target="_blank">View source</a>]
</div>
</div>
@ -1105,7 +1106,7 @@ scope.add_variable(var_node)</code></pre>
def <strong>arguments</strong> : Array(<a href="../../Ameba/AST/Argument.html">Ameba::AST::Argument</a>)
<a class="method-permalink" href="#arguments:Array(Ameba::AST::Argument)-instance-method">#</a>
<a class="method-permalink" href="#arguments%3AArray%28Ameba%3A%3AAST%3A%3AArgument%29-instance-method">#</a>
</div>
<div class="doc">
@ -1116,7 +1117,7 @@ scope.add_variable(var_node)</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L14" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L14" target="_blank">View source</a>]
</div>
</div>
@ -1126,13 +1127,12 @@ scope.add_variable(var_node)</code></pre>
def <strong>assign_variable</strong>(name, node)
<a class="method-permalink" href="#assign_variable(name,node)-instance-method">#</a>
<a class="method-permalink" href="#assign_variable%28name%2Cnode%29-instance-method">#</a>
</div>
<div class="doc">
<p>Creates a new assignment for the variable.</p>
<pre><code class="language-crystal">scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
scope.assign_variable(var_name, assign_node)</code></pre>
</div>
@ -1140,7 +1140,7 @@ scope.assign_variable(var_name, assign_node)</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L90" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L90" target="_blank">View source</a>]
</div>
</div>
@ -1150,7 +1150,7 @@ scope.assign_variable(var_name, assign_node)</code></pre>
def <strong>assigns_ivar?</strong>(name)
<a class="method-permalink" href="#assigns_ivar?(name)-instance-method">#</a>
<a class="method-permalink" href="#assigns_ivar%3F%28name%29-instance-method">#</a>
</div>
<div class="doc">
@ -1161,7 +1161,7 @@ scope.assign_variable(var_name, assign_node)</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L119" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L119" target="_blank">View source</a>]
</div>
</div>
@ -1171,7 +1171,7 @@ scope.assign_variable(var_name, assign_node)</code></pre>
def <strong>block?</strong>
<a class="method-permalink" href="#block?-instance-method">#</a>
<a class="method-permalink" href="#block%3F-instance-method">#</a>
</div>
<div class="doc">
@ -1183,7 +1183,7 @@ false if not.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L96" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L96" target="_blank">View source</a>]
</div>
</div>
@ -1193,7 +1193,7 @@ false if not.</p>
def <strong>def?</strong>
<a class="method-permalink" href="#def?-instance-method">#</a>
<a class="method-permalink" href="#def%3F-instance-method">#</a>
</div>
<div class="doc">
@ -1204,7 +1204,7 @@ false if not.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L145" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L145" target="_blank">View source</a>]
</div>
</div>
@ -1214,29 +1214,29 @@ false if not.</p>
def <strong>end_location</strong>(*args, **options)
<a class="method-permalink" href="#end_location(*args,**options)-instance-method">#</a>
<a class="method-permalink" href="#end_location%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L30" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L30" target="_blank">View source</a>]
</div>
</div>
<div class="entry-detail" id="end_location(*args,**options,&)-instance-method">
<div class="entry-detail" id="end_location(*args,**options,&amp;)-instance-method">
<div class="signature">
def <strong>end_location</strong>(*args, **options, &)
<a class="method-permalink" href="#end_location(*args,**options,&)-instance-method">#</a>
<a class="method-permalink" href="#end_location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L30" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L30" target="_blank">View source</a>]
</div>
</div>
@ -1246,19 +1246,19 @@ false if not.</p>
def <strong>eql?</strong>(node)
<a class="method-permalink" href="#eql?(node)-instance-method">#</a>
<a class="method-permalink" href="#eql%3F%28node%29-instance-method">#</a>
</div>
<div class="doc">
<p>Returns true if the <code><a href="../../Ameba/AST/Scope.html#node:Crystal::ASTNode-instance-method">#node</a></code> represents exactly
<p>Returns true if the <code><a href="../../Ameba/AST/Scope.html#node%3ACrystal%3A%3AASTNode-instance-method">#node</a></code> represents exactly
the same Crystal node as <code>@node</code>.</p>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L174" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L174" target="_blank">View source</a>]
</div>
</div>
@ -1268,13 +1268,12 @@ the same Crystal node as <code>@node</code>.</p>
def <strong>find_variable</strong>(name : String)
<a class="method-permalink" href="#find_variable(name:String)-instance-method">#</a>
<a class="method-permalink" href="#find_variable%28name%3AString%29-instance-method">#</a>
</div>
<div class="doc">
<p>Returns variable by its name or nil if it does not exist.</p>
<pre><code class="language-crystal">scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
scope.find_variable(<span class="s">&quot;foo&quot;</span>)</code></pre>
</div>
@ -1282,7 +1281,7 @@ scope.find_variable(<span class="s">&quot;foo&quot;</span>)</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L80" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L80" target="_blank">View source</a>]
</div>
</div>
@ -1292,7 +1291,7 @@ scope.find_variable(<span class="s">&quot;foo&quot;</span>)</code></pre>
def <strong>hash</strong>(hasher)
<a class="method-permalink" href="#hash(hasher)-instance-method">#</a>
<a class="method-permalink" href="#hash%28hasher%29-instance-method">#</a>
</div>
<div class="doc">
@ -1315,7 +1314,7 @@ scope.find_variable(<span class="s">&quot;foo&quot;</span>)</code></pre>
def <strong>in_macro?</strong>
<a class="method-permalink" href="#in_macro?-instance-method">#</a>
<a class="method-permalink" href="#in_macro%3F-instance-method">#</a>
</div>
<div class="doc">
@ -1326,7 +1325,7 @@ scope.find_variable(<span class="s">&quot;foo&quot;</span>)</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L114" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L114" target="_blank">View source</a>]
</div>
</div>
@ -1336,7 +1335,7 @@ scope.find_variable(<span class="s">&quot;foo&quot;</span>)</code></pre>
def <strong>inner_scopes</strong> : Array(<a href="../../Ameba/AST/Scope.html">Ameba::AST::Scope</a>)
<a class="method-permalink" href="#inner_scopes:Array(Ameba::AST::Scope)-instance-method">#</a>
<a class="method-permalink" href="#inner_scopes%3AArray%28Ameba%3A%3AAST%3A%3AScope%29-instance-method">#</a>
</div>
<div class="doc">
@ -1347,7 +1346,7 @@ scope.find_variable(<span class="s">&quot;foo&quot;</span>)</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L23" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L23" target="_blank">View source</a>]
</div>
</div>
@ -1357,7 +1356,7 @@ scope.find_variable(<span class="s">&quot;foo&quot;</span>)</code></pre>
def <strong>ivariables</strong> : Array(<a href="../../Ameba/AST/InstanceVariable.html">Ameba::AST::InstanceVariable</a>)
<a class="method-permalink" href="#ivariables:Array(Ameba::AST::InstanceVariable)-instance-method">#</a>
<a class="method-permalink" href="#ivariables%3AArray%28Ameba%3A%3AAST%3A%3AInstanceVariable%29-instance-method">#</a>
</div>
<div class="doc">
@ -1368,23 +1367,7 @@ scope.find_variable(<span class="s">&quot;foo&quot;</span>)</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L17" target="_blank">View source</a>]
</div>
</div>
<div class="entry-detail" id="location(*args,**options,&)-instance-method">
<div class="signature">
def <strong>location</strong>(*args, **options, &)
<a class="method-permalink" href="#location(*args,**options,&)-instance-method">#</a>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L29" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L17" target="_blank">View source</a>]
</div>
</div>
@ -1394,13 +1377,29 @@ scope.find_variable(<span class="s">&quot;foo&quot;</span>)</code></pre>
def <strong>location</strong>(*args, **options)
<a class="method-permalink" href="#location(*args,**options)-instance-method">#</a>
<a class="method-permalink" href="#location%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L29" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L29" target="_blank">View source</a>]
</div>
</div>
<div class="entry-detail" id="location(*args,**options,&amp;)-instance-method">
<div class="signature">
def <strong>location</strong>(*args, **options, &)
<a class="method-permalink" href="#location%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L29" target="_blank">View source</a>]
</div>
</div>
@ -1410,7 +1409,7 @@ scope.find_variable(<span class="s">&quot;foo&quot;</span>)</code></pre>
def <strong>node</strong> : Crystal::ASTNode
<a class="method-permalink" href="#node:Crystal::ASTNode-instance-method">#</a>
<a class="method-permalink" href="#node%3ACrystal%3A%3AASTNode-instance-method">#</a>
</div>
<div class="doc">
@ -1421,7 +1420,7 @@ scope.find_variable(<span class="s">&quot;foo&quot;</span>)</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L26" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L26" target="_blank">View source</a>]
</div>
</div>
@ -1431,7 +1430,7 @@ scope.find_variable(<span class="s">&quot;foo&quot;</span>)</code></pre>
def <strong>outer_scope</strong> : <a href="../../Ameba/AST/Scope.html">Scope</a>?
<a class="method-permalink" href="#outer_scope:Scope?-instance-method">#</a>
<a class="method-permalink" href="#outer_scope%3AScope%3F-instance-method">#</a>
</div>
<div class="doc">
@ -1442,7 +1441,7 @@ scope.find_variable(<span class="s">&quot;foo&quot;</span>)</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L20" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L20" target="_blank">View source</a>]
</div>
</div>
@ -1452,7 +1451,7 @@ scope.find_variable(<span class="s">&quot;foo&quot;</span>)</code></pre>
def <strong>references</strong> : Array(<a href="../../Ameba/AST/Reference.html">Ameba::AST::Reference</a>)
<a class="method-permalink" href="#references:Array(Ameba::AST::Reference)-instance-method">#</a>
<a class="method-permalink" href="#references%3AArray%28Ameba%3A%3AAST%3A%3AReference%29-instance-method">#</a>
</div>
<div class="doc">
@ -1463,7 +1462,7 @@ scope.find_variable(<span class="s">&quot;foo&quot;</span>)</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L11" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L11" target="_blank">View source</a>]
</div>
</div>
@ -1473,7 +1472,7 @@ scope.find_variable(<span class="s">&quot;foo&quot;</span>)</code></pre>
def <strong>references?</strong>(variable : <a href="../../Ameba/AST/Variable.html">Variable</a>, check_inner_scopes = <span class="n">true</span>)
<a class="method-permalink" href="#references?(variable:Variable,check_inner_scopes=true)-instance-method">#</a>
<a class="method-permalink" href="#references%3F%28variable%3AVariable%2Ccheck_inner_scopes%3Dtrue%29-instance-method">#</a>
</div>
<div class="doc">
@ -1485,7 +1484,7 @@ false if not.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L137" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L137" target="_blank">View source</a>]
</div>
</div>
@ -1495,13 +1494,12 @@ false if not.</p>
def <strong>spawn_block?</strong>
<a class="method-permalink" href="#spawn_block?-instance-method">#</a>
<a class="method-permalink" href="#spawn_block%3F-instance-method">#</a>
</div>
<div class="doc">
<p>Returns true if current scope represents a spawn block, e. g.</p>
<pre><code class="language-crystal">spawn <span class="k">do</span>
<span class="c"># ...</span>
<span class="k">end</span></code></pre>
@ -1510,7 +1508,7 @@ false if not.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L107" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L107" target="_blank">View source</a>]
</div>
</div>
@ -1520,29 +1518,29 @@ false if not.</p>
def <strong>to_s</strong>(*args, **options)
<a class="method-permalink" href="#to_s(*args,**options)-instance-method">#</a>
<a class="method-permalink" href="#to_s%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L28" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L28" target="_blank">View source</a>]
</div>
</div>
<div class="entry-detail" id="to_s(*args,**options,&)-instance-method">
<div class="entry-detail" id="to_s(*args,**options,&amp;)-instance-method">
<div class="signature">
def <strong>to_s</strong>(*args, **options, &)
<a class="method-permalink" href="#to_s(*args,**options,&)-instance-method">#</a>
<a class="method-permalink" href="#to_s%28%2Aargs%2C%2A%2Aoptions%2C%26%29-instance-method">#</a>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L28" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L28" target="_blank">View source</a>]
</div>
</div>
@ -1552,7 +1550,7 @@ false if not.</p>
def <strong>top_level?</strong>
<a class="method-permalink" href="#top_level?-instance-method">#</a>
<a class="method-permalink" href="#top_level%3F-instance-method">#</a>
</div>
<div class="doc">
@ -1563,7 +1561,7 @@ false if not.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L150" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L150" target="_blank">View source</a>]
</div>
</div>
@ -1573,7 +1571,7 @@ false if not.</p>
def <strong>type_definition?</strong>
<a class="method-permalink" href="#type_definition?-instance-method">#</a>
<a class="method-permalink" href="#type_definition%3F-instance-method">#</a>
</div>
<div class="doc">
@ -1585,7 +1583,7 @@ type definition, for example a class.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L126" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L126" target="_blank">View source</a>]
</div>
</div>
@ -1595,7 +1593,7 @@ type definition, for example a class.</p>
def <strong>variables</strong> : Array(<a href="../../Ameba/AST/Variable.html">Ameba::AST::Variable</a>)
<a class="method-permalink" href="#variables:Array(Ameba::AST::Variable)-instance-method">#</a>
<a class="method-permalink" href="#variables%3AArray%28Ameba%3A%3AAST%3A%3AVariable%29-instance-method">#</a>
</div>
<div class="doc">
@ -1606,7 +1604,7 @@ type definition, for example a class.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/ast/scope.cr#L8" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/ast/scope.cr#L8" target="_blank">View source</a>]
</div>
</div>