Sha256: c2185db2620cc4510ceacb60de3ef221e2acac2356e2d5f4620f453d7629a992
Contents?: true
Size: 330 Bytes
Versions: 1
Compression:
Stored size: 330 Bytes
Contents
class Kredis::Types::List < Kredis::Types::Proxy def elements lrange(0, -1) || [] end def remove(elements) Array(elements).each { |element| lrem 0, element } end def prepend(elements) lpush elements if Array(elements).any? end def append(elements) rpush elements if Array(elements).any? end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kredis-0.1.2 | lib/kredis/types/list.rb |