Sha256: 1afa54ee32e5b357bfc02bc400519285dbe253f386008ceba7b7b6ea5d64d61c

Contents?: true

Size: 662 Bytes

Versions: 8

Compression:

Stored size: 662 Bytes

Contents

# frozen_string_literal: true

class ActiveOrm::Redis::PubSub < ActiveOrm::Redis::Base
  class << self

    def publish(channel, message)
      client.publish(channel, message)
    end

    def subscribed?
      client.subscribed?
    end

    def subscribe(*channels, &block)
      client.subscribe(channels, &block)
    end

    def unsubscribe(*channels)
      client.unsubscribe(channels)
    end

    def match_subscribe(*channels, &block)
      client.psubscribe(channels, &block)
    end

    def match_unsubscribe(*channels)
      client.punsubscribe(channels)
    end

    def state(command, *args)
      client.pubsub(command, args)
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
active_orm-5.1.0 lib/active_orm/redis/pub_sub.rb
active_orm-5.0.6 lib/active_orm/redis/pub_sub.rb
active_orm-5.0.5 lib/active_orm/redis/pub_sub.rb
active_orm-5.0.4 lib/active_orm/redis/pub_sub.rb
active_orm-5.0.3 lib/active_orm/redis/pub_sub.rb
active_orm-5.0.2 lib/active_orm/redis/pub_sub.rb
active_orm-5.0.1 lib/active_orm/redis/pub_sub.rb
active_orm-5.0.0 lib/active_orm/redis/pub_sub.rb