Module: Reek::Source::SexpExtensions::CaseNode
- Defined in:
- lib/reek/source/sexp_extensions.rb
Overview
Utility methods for :case nodes
Instance Method Summary collapse
Instance Method Details
#body_nodes(type, ignoring = []) ⇒ Object
117 118 119 |
# File 'lib/reek/source/sexp_extensions.rb', line 117 def body_nodes(type, ignoring = []) children[1..-1].compact.flat_map { |child| child.find_nodes(type, ignoring) } end |
#condition ⇒ Object
115 |
# File 'lib/reek/source/sexp_extensions.rb', line 115 def condition() self[1] end |
#else_body ⇒ Object
121 122 123 |
# File 'lib/reek/source/sexp_extensions.rb', line 121 def else_body children.last end |