Module: Reek::Source::SexpExtensions::IfNode

Defined in:
lib/reek/source/sexp_extensions.rb

Overview

Utility methods for :if nodes

Instance Method Summary collapse

Instance Method Details

#body_nodes(type, ignoring = []) ⇒ Object


249
250
251
# File 'lib/reek/source/sexp_extensions.rb', line 249

def body_nodes(type, ignoring = [])
  children[1..-1].compact.flat_map { |child| child.find_nodes(type, ignoring) }
end

#conditionObject


247
# File 'lib/reek/source/sexp_extensions.rb', line 247

def condition() self[1] end