class Mongoid::Errors::NoClientHosts

This error is raised when a client is configured without hosts.

Public Class Methods

new(name, config) click to toggle source

Create the new error.

@example Create the new error.

NoClientHosts.new(:default, {}})

@param [ Symbol, String ] name The db config key. @param [ Hash ] config The hash configuration options.

@since 3.0.0

Calls superclass method
# File lib/mongoid/errors/no_client_hosts.rb, line 19
def initialize(name, config)
  super(
    compose_message(
      "no_client_hosts",
      { name: name, config: config }
    )
  )
end