class RuboCop::AST::IfNode

def else?

Returns:
  • (Boolean) - whether the node has an `else` clause

Other tags:
    Note: - This returns `true` for nodes containing an `elsif` clause.
def else?
  loc.respond_to?(:else) && loc.else
end