class RuboCop::AST::CaseNode

def branches

Returns:
  • (Array) - an array of the bodies of the when branches
def branches
  bodies = when_branches.map(&:body)
  bodies.push(else_branch) if else?
  bodies
end