lib/mongo/server/description.rb
# Returns whether this server is a primary, per the SDAM spec.
#
# @example Is the server a primary?
#   description.primary?
#
# @return [ true, false ] If the server is a primary.
#
# @since 2.0.0
Returns whether this server is a primary, per the SDAM spec.
Returns whether this server is a primary per the SDAM spec .
def primary?
        ok? &&
          (config['ismaster'] == true || config['isWritablePrimary'] == true ) &&
        !!config['setName']
      end
def primary? ok? && ( config [ 'ismaster' ] == true || config [ 'isWritablePrimary' ] == true ) && ! ! config [ 'setName' ] end
Returns whether this server is a primary, per the SDAM spec.
Returns whether this server is a primary per the SDAM spec .
If the server is a primary.
If the server is a primary .
 true, false 
example
None
since
None