def summary
      status = case
      when primary?
        'PRIMARY'
      when secondary?
        'SECONDARY'
      when standalone?
        'STANDALONE'
      when arbiter?
        'ARBITER'
      when ghost?
        'GHOST'
      when other?
        'OTHER'
      when unknown?
        'UNKNOWN'
      else
        # Since the summary method is often used for debugging, do not raise
        # an exception in case none of the expected types matched
        ''
      end
      if replica_set_name
        status += " replica_set=#{replica_set_name}"
      end
      address_bit = if address
        "#{address.host}:#{address.port}"
      else
        'nil'
      end
      "#<Server address=#{address_bit} #{status}>"
    end
def summary
      status = case
      when primary?
        'PRIMARY'
      when secondary?
        'SECONDARY'
      when standalone?
        'STANDALONE'
      when arbiter?
        'ARBITER'
      when ghost?
        'GHOST'
      when other?
        'OTHER'
      when unknown?
        'UNKNOWN'
      else
        # Since the summary method is often used for debugging, do not raise
        # an exception in case none of the expected types matched
        ''
      end
      if replica_set_name
        status += " replica_set=#{replica_set_name}"
      end
      address_bit = if address
        "#{address.host}:#{address.port}"
      else
        'nil'
      end
      "#<Server address=#{address_bit} #{status}>"
    end
@note This method is experimental and subject to change.

 @api experimental
 @since 2.7.0