Module: Reek::AST::SexpExtensions::CaseNode
- Defined in:
- lib/reek/ast/sexp_extensions/case.rb
Overview
Utility methods for :case nodes.
Instance Method Summary collapse
Instance Method Details
#body_nodes(type, ignoring = []) ⇒ Object
12 13 14 15 16 |
# File 'lib/reek/ast/sexp_extensions/case.rb', line 12 def body_nodes(type, ignoring = []) children[1..].compact.flat_map do |child| child.each_node(type, ignoring | type).to_a end end |
#condition ⇒ Object
8 9 10 |
# File 'lib/reek/ast/sexp_extensions/case.rb', line 8 def condition children.first end |
#else_body ⇒ Object
18 19 20 |
# File 'lib/reek/ast/sexp_extensions/case.rb', line 18 def else_body children.last end |