Class: Thebes::Sphinxql::Client

Inherits:
Mysql2::Client
  • Object
show all
Defined in:
lib/thebes/sphinxql/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Client

Returns a new instance of Client.



9
10
11
12
13
14
15
# File 'lib/thebes/sphinxql/client.rb', line 9

def initialize *args
  if !args.empty? || (!self.class.servers || self.class.servers.empty?)
    super *args
  else
    super self.class.servers[rand(self.class.servers.size)]
  end
end