Sha256: ed8779c28055cf7b8b26224bbb0c17bd4432d17cbfb32331e97f0a16131e83e9
Contents?: true
Size: 326 Bytes
Versions: 3
Compression:
Stored size: 326 Bytes
Contents
module Mongo class MongoClient def is_replicaset? begin cmd = BSON::OrderedHash.new cmd["replSetGetStatus"] = 1 result = self.db("admin").command(cmd) return !result["set"].blank? rescue Mongo::OperationFailure return false end end end end
Version data entries
3 entries across 3 versions & 1 rubygems