Ameba::AST::RedundantControlExpressionVisitor - ameba 1.6.4-1-dev

# class Ameba::AST::RedundantControlExpressionVisitor

- Ameba::AST::RedundantControlExpressionVisitor
- Reference
- Object

##
Overview

A class that utilizes a logic to traverse AST nodes and fire a source test callback if a redundant `Crystal::ControlExpression` is reached.

##
Defined in:

ameba/ast/visitors/redundant_control_expression_visitor.cr

##
Constructors

- .new(rule : Ameba::Rule::Base, source : Ameba::Source, node : Crystal::ASTNode)

##
Instance Method Summary

- #node : Crystal::ASTNode

  A node to run traversal on.

- #rule : Rule::Base

  A corresponding rule that uses this visitor.

- #source : Source

  A source that needs to be traversed.

##
Constructor Detail

def self.new(rule : Ameba::Rule::Base, source : Ameba::Source, node : Crystal::ASTNode) #

##
Instance Method Detail

def node : Crystal::ASTNode #

A node to run traversal on.

def rule : Rule::Base #

A corresponding rule that uses this visitor.

def source : Source #

A source that needs to be traversed.