Method: Redis#ltrim

Defined in:
lib/redis.rb

#ltrim(key, start, stop) ⇒ String

Trim a list to the specified range.

Parameters:

  • key (String)
  • start (Fixnum)

    start index

  • stop (Fixnum)

    stop index

Returns:

  • (String)

    OK



1201
1202
1203
1204
1205
# File 'lib/redis.rb', line 1201

def ltrim(key, start, stop)
  synchronize do |client|
    client.call([:ltrim, key, start, stop])
  end
end