class Mongo::Server::Description::Features
Defines behaviour around what features a specific server supports.
@since 2.0.0
Constants
- DRIVER_WIRE_VERSIONS
The wire protocol versions that this version of the driver supports.
@since 2.0.0
- MAPPINGS
List of features and the wire protocol version they appear in.
@since 2.0.0
Attributes
server_wire_versions[R]
@return [ Range ] #server_wire_versions The server's supported wire
versions.
Public Class Methods
new(server_wire_versions)
click to toggle source
Initialize the features.
@example Initialize the features.
Features.new(0..3)
@param [ Range ] #server_wire_versions The server supported wire
versions.
@since 2.0.0
# File lib/mongo/server/description/features.rb, line 72 def initialize(server_wire_versions) @server_wire_versions = server_wire_versions check_driver_support! end
Private Instance Methods
check_driver_support!()
click to toggle source
# File lib/mongo/server/description/features.rb, line 79 def check_driver_support! if DRIVER_WIRE_VERSIONS.max < server_wire_versions.min || DRIVER_WIRE_VERSIONS.min > server_wire_versions.max raise Error::UnsupportedFeatures.new(server_wire_versions) end end