Method: MongoModel::Configuration#connection
- Defined in:
- lib/mongomodel/support/configuration.rb
#connection ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/mongomodel/support/configuration.rb', line 55 def connection if replicas.any? @connection ||= Mongo::MongoReplicaSetClient.new(replicas, ) else @connection ||= Mongo::MongoClient.new(host, port, ) end end |