Class: ActiveOrm::Redis::PubSub

Inherits:
Base
  • Object
show all
Defined in:
lib/active_orm/redis/pub_sub.rb

Class Method Summary collapse

Methods inherited from Base

client, evaluate

Class Method Details

.match_subscribe(*channels, &block) ⇒ Object



22
23
24
# File 'lib/active_orm/redis/pub_sub.rb', line 22

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

.match_unsubscribe(*channels) ⇒ Object



26
27
28
# File 'lib/active_orm/redis/pub_sub.rb', line 26

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

.publish(channel, message) ⇒ Object



6
7
8
# File 'lib/active_orm/redis/pub_sub.rb', line 6

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

.state(command, *args) ⇒ Object



30
31
32
# File 'lib/active_orm/redis/pub_sub.rb', line 30

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

.subscribe(*channels, &block) ⇒ Object



14
15
16
# File 'lib/active_orm/redis/pub_sub.rb', line 14

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

.subscribed?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/active_orm/redis/pub_sub.rb', line 10

def subscribed?
  client.subscribed?
end

.unsubscribe(*channels) ⇒ Object



18
19
20
# File 'lib/active_orm/redis/pub_sub.rb', line 18

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