class Redis

def bitpos(key, bit, start=nil, stop=nil)

Returns:
  • (Fixnum) - the position of the first 1/0 bit.

Parameters:
  • stop (Fixnum) -- stop index
  • start (Fixnum) -- start index
  • bit (Fixnum) -- whether to look for the first 1 or 0 bit
  • key (String) --
def bitpos(key, bit, start=nil, stop=nil)
  if stop and not start
    raise(ArgumentError, 'stop parameter specified without start parameter')
  end
  synchronize do |client|
    command = [:bitpos, key, bit]
    command << start if start
    command << stop if stop
    client.call(command)
  end
end