Sha256: b7e17dc11e23b47444f103d278bb827819589d8345b6e508fc38ae13ebf8f1b7

Contents?: true

Size: 314 Bytes

Versions: 1

Compression:

Stored size: 314 Bytes

Contents

module Ohm

  # Represents a key in Redis.
  class Key < Nest
    def volatile
      self.index("~") == 0 ? self : self.class.new("~", redis)[self]
    end

    def +(other)
      self.class.new("#{self}+#{other}", redis)
    end

    def -(other)
      self.class.new("#{self}-#{other}", redis)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ohm-0.1.0.rc6 lib/ohm/key.rb