lib/polyphony/adapters/redis.rb
# Formats a command for sending to server.
#
# @param args [Array] command
# @return [String] formatted command
Formats a command for sending to server.
Formats a command for sending to server .
def format_command(args)
    args = args.flatten
    (+"*#{args.size}\r\n").tap do |s|
      args.each do |a|
        a = a.to_s
        s << "$#{a.bytesize}\r\n#{a}\r\n"
      end
    end
  end
def format_command ( args ) args = args . flatten ( + "*#{args.size}\r\n" ) . tap do | s | args . each do | a | a = a . to_s s << "$#{a.bytesize}\r\n#{a}\r\n" end end end
Formats a command for sending to server.
Formats a command for sending to server .
None
String
args
None