Sha256: 4e4d4ca5de35d5c50f7ecc007009fcc071681ab9bfc27b3b2683dc65b760feab
Contents?: true
Size: 517 Bytes
Versions: 5
Compression:
Stored size: 517 Bytes
Contents
class Kredis::Types::List < Kredis::Types::Proxying proxying :lrange, :lrem, :lpush, :rpush attr_accessor :typed def elements strings_to_types(lrange(0, -1) || [], typed) end alias to_a elements def remove(*elements) types_to_strings(elements).each { |element| lrem 0, element } end def prepend(*elements) lpush types_to_strings(elements) if elements.flatten.any? end def append(*elements) rpush types_to_strings(elements) if elements.flatten.any? end alias << append end
Version data entries
5 entries across 5 versions & 1 rubygems