Sha256: 27923bdab56524266941fd7a05d33cd8df00cbc3da95d7064f22607409d68162

Contents?: true

Size: 331 Bytes

Versions: 1

Compression:

Stored size: 331 Bytes

Contents

module Hari
  class Relation < Entity
    module SortedSet
      extend self

      def create(rel)
        Relation::DIRECTIONS.each { |d| Hari.redis.zadd rel.key(d), rel.weight(d), rel.id }
      end

      def delete(rel)
        Relation::DIRECTIONS.each { |d| Hari.redis.zrem rel.key(d), rel.id }
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hari-0.0.3 lib/hari/relation/sorted_set.rb