Method: Riddle::Client#initialize

Defined in:
lib/riddle/client.rb

#initialize(servers = nil, port = nil, key = nil) ⇒ Client

Can instantiate with a specific server and port - otherwise it assumes defaults of localhost and 9312 respectively. All other settings can be accessed and changed via the attribute accessors.



144
145
146
147
148
149
150
151
152
153
154
155
# File 'lib/riddle/client.rb', line 144

def initialize(servers = nil, port = nil, key = nil)
  Riddle.version_warning

  @servers = Array(servers || "localhost")
  @port   = port || 9312
  @socket = nil
  @key    = key

  reset

  @queue = []
end