Method: Redis#getbit

Defined in:
lib/redis.rb

#getbit(key, offset) ⇒ Fixnum

Returns the bit value at offset in the string value stored at key.

Parameters:

  • key (String)
  • offset (Fixnum)

    bit offset

Returns:

  • (Fixnum)

    0 or 1



868
869
870
871
872
# File 'lib/redis.rb', line 868

def getbit(key, offset)
  synchronize do |client|
    client.call([:getbit, key, offset])
  end
end