Module: RSolr::Async::Connectable

Defined in:
lib/rsolr-async.rb

Instance Method Summary collapse

Instance Method Details

#connect(*args, &blk) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/rsolr-async.rb', line 15

def connect *args, &blk
  if args.first == :async
    rsolr = RSolr::Client.new(RSolr::Async::Connection.new(*args[1..-1]))
    block_given? ? (yield rsolr) : rsolr
  else
    super *args, &blk
  end
end