Module: Reek::AST::SexpExtensions::WhenNode

Defined in:
lib/reek/ast/sexp_extensions/when.rb

Overview

Utility methods for :when nodes.

Instance Method Summary collapse

Instance Method Details

#bodyObject



12
13
14
# File 'lib/reek/ast/sexp_extensions/when.rb', line 12

def body
  children.last
end

#condition_listObject



8
9
10
# File 'lib/reek/ast/sexp_extensions/when.rb', line 8

def condition_list
  children[0..-2]
end