Method: Rubcask::Server::Client.with_client
- Defined in:
- lib/rubcask/server/client.rb
.with_client(host, port) {|the| ... } ⇒ Object
yields a new client to the block closes the client after the block is terminated
23 24 25 26 27 28 29 30 |
# File 'lib/rubcask/server/client.rb', line 23 def self.with_client(host, port) client = new(host, port) begin yield client ensure client.close end end |