Module: Reek::AST::SexpExtensions::CaseNode 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 :case nodes.
Instance Method Summary collapse
- #body_nodes(type, ignoring = []) ⇒ Object private
- #condition ⇒ Object private
- #else_body ⇒ 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.
150 151 152 |
# File 'lib/reek/ast/sexp_extensions.rb', line 150 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.
148 |
# File 'lib/reek/ast/sexp_extensions.rb', line 148 def condition() self[1] end |
#else_body ⇒ 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.
154 155 156 |
# File 'lib/reek/ast/sexp_extensions.rb', line 154 def else_body children.last end |