Class: CassandraClient::SafeClient

Inherits:
Object
  • Object
show all
Defined in:
lib/cassandra_client/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(client, transport) ⇒ SafeClient

Returns a new instance of SafeClient.



50
51
52
53
# File 'lib/cassandra_client/client.rb', line 50

def initialize(client, transport)
  @client = client 
  @transport = transport
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args) ⇒ Object



55
56
57
58
59
60
61
62
# File 'lib/cassandra_client/client.rb', line 55

def method_missing(*args)
  @client.send(*args)
rescue IOError
  @transport.open
  raise if defined?(once)
  once = true
  retry
end