lib/mongo/client.rb
def server_selector
      @server_selector ||= if read_preference
        ServerSelector.get(read_preference)
      else
        ServerSelector.primary
      end
    end
# Get the server selector. It either uses the read preference
# defined in the client options or defaults to a Primary server selector.
#
# @example Get the server selector.
#   client.server_selector
#
# @return [ Mongo::ServerSelector ] The server selector using the
#  user-defined read preference or a Primary server selector default.
#
# @since 2.5.0
Get the server selector. It either uses the read preference
defined in the client options or defaults to a Primary server selector.
Get the server selector . It either uses the read preference defined in the client options or defaults to a Primary server selector .
def server_selector
      @server_selector ||= if read_preference
        ServerSelector.get(read_preference)
      else
        ServerSelector.primary
      end
    end
def server_selector @server_selector ||= if read_preference ServerSelector . get ( read_preference ) else ServerSelector . primary end end
Get the server selector.
Get the server selector .
The server selector using the user-defined read preference or a Primary server selector default.
The server selector using the user - defined read preference or a Primary server selector default .
 Mongo::ServerSelector 
example
Get the server selector. client.server_selector
Get the server selector . client . server_selector
since
None