Method: Couchbase::ConnectionPool#define_proxy_method

Defined in:
lib/couchbase/connection_pool.rb

#define_proxy_method(name) ⇒ Object (protected)



47
48
49
50
51
52
53
54
55
# File 'lib/couchbase/connection_pool.rb', line 47

def define_proxy_method(name)
  self.class.class_eval <<-RUBY
    def #{name}(*args, &block)
      @pool.with do |connection|
        connection.send(#{name.inspect}, *args, &block)
      end
    end
  RUBY
end