class RuboCop::AST::IfNode

def if_branch

Returns:
  • (nil) - if the truthy branch is empty
  • (Node) - the truthy branch node of the `if` node

Other tags:
    Note: - This is normalized for `unless` nodes.
def if_branch
  node_parts[1]
end