Method: Redis::List#shift

Defined in:
lib/redis/list.rb

#shift(n = nil) ⇒ Object

Remove a member from the start of the list. Redis: LPOP



62
63
64
65
66
67
68
# File 'lib/redis/list.rb', line 62

def shift(n=nil)
  if n
    unmarshal redis.lpop(key, n)
  else
    unmarshal redis.lpop(key)
  end
end