lib/riak/client/beefcake/socket.rb in riak-client-2.2.0.pre1 vs lib/riak/client/beefcake/socket.rb in riak-client-2.2.0
- old
+ new
@@ -10,11 +10,11 @@
# @api private
class BeefcakeSocket
include Client::BeefcakeMessageCodes
# Only create class methods, don't initialize
class << self
- def new(host, port, options={})
+ def new(host, port, options = {})
return start_tcp_socket(host, port) if options[:authentication].blank?
return start_tls_socket(host, port, options[:authentication])
end
private
@@ -215,10 +215,10 @@
expect_message :PingResp
end
# Write a protocol buffers message to whatever the current
# socket is.
- def write_message(code, message='')
+ def write_message(code, message = '')
if code.is_a? Symbol
code = BeefcakeMessageCodes.index code
end
header = [message.length+1, code].pack 'NC'