Class: Thebes::Sphinxql::Client
- Inherits:
-
Mysql2::Client
- Object
- Mysql2::Client
- Thebes::Sphinxql::Client
- Defined in:
- lib/thebes/sphinxql/client.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ Client
constructor
A new instance of Client.
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 |