Module: Reek::AST::SexpExtensions::IfNode Private
- Defined in:
- lib/reek/ast/sexp_extensions.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Utility methods for :if nodes.
Instance Method Summary collapse
- #body_nodes(type, ignoring = []) ⇒ Object private
- #condition ⇒ Object private
Instance Method Details
#body_nodes(type, ignoring = []) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
301 302 303 |
# File 'lib/reek/ast/sexp_extensions.rb', line 301 def body_nodes(type, ignoring = []) children[1..-1].compact.flat_map { |child| child.find_nodes(type, ignoring) } end |
#condition ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
299 |
# File 'lib/reek/ast/sexp_extensions.rb', line 299 def condition() self[1] end |