title: How to check connection to mongodb is active?
body: <p>What method should I call on <code>Mongo::Client</code> object to check that connection to the database server is active?</p>
  
  <pre><code>require 'mongo'
  host = '127.0.0.1'
  port = '27017'
  
  client = Mongo::Client.new("mongodb://#{host}:#{port}")
  </code></pre>