Class: ActiveOrm::Redis::PubSub
- Defined in:
- lib/active_orm/redis/pub_sub.rb
Class Method Summary collapse
- .match_subscribe(*channels, &block) ⇒ Object
- .match_unsubscribe(*channels) ⇒ Object
- .publish(channel, message) ⇒ Object
- .state(command, *args) ⇒ Object
- .subscribe(*channels, &block) ⇒ Object
- .subscribed? ⇒ Boolean
- .unsubscribe(*channels) ⇒ Object
Methods inherited from Base
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, ) client.publish(channel, ) 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
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 |