vendor/bundle/ruby/2.6.0/gems/rubocop-ast-1.18.0/lib/rubocop/ast/node/if_node.rb
# Returns an array of all the branches in the conditional statement.
#
# @return [Array<Node>] an array of branch nodes
Returns an array of all the branches in the conditional statement.
Returns an array of all the branches in the conditional statement .
def branches
        if ternary?
          [if_branch, else_branch]
        elsif !else?
          [if_branch]
        else
          branches = [if_branch]
          other_branches = if elsif_conditional?
                             else_branch.branches
                           else
                             [else_branch]
                           end
          branches.concat(other_branches)
        end
      end
def branches if ternary? [ if_branch , else_branch ] elsif ! else? [ if_branch ] else branches = [ if_branch ] other_branches = if elsif_conditional? else_branch . branches else [ else_branch ] end branches . concat ( other_branches ) end end
Returns an array of all the branches in the conditional statement.
Returns an array of all the branches in the conditional statement .
an array of branch nodes
an array of branch nodes
Array<Node>