Class: PushClient::Subscriber
- Inherits:
-
Communicator
- Object
- Communicator
- PushClient::Subscriber
- Defined in:
- lib/push-client.rb
Constant Summary
Constants inherited from Communicator
Instance Method Summary collapse
-
#initialize(hub) {|_self| ... } ⇒ Subscriber
constructor
A new instance of Subscriber.
- #subscribe(feed, callback, options = {}) ⇒ Object
- #unsubscribe(feed, callback, options = {}) ⇒ Object
Constructor Details
#initialize(hub) {|_self| ... } ⇒ Subscriber
Returns a new instance of Subscriber.
20 21 22 23 |
# File 'lib/push-client.rb', line 20 def initialize(hub) super(hub) yield self if block_given? end |
Instance Method Details
#subscribe(feed, callback, options = {}) ⇒ Object
25 26 27 |
# File 'lib/push-client.rb', line 25 def subscribe(feed, callback, = {}) command('subscribe', feed, callback, ) end |
#unsubscribe(feed, callback, options = {}) ⇒ Object
29 30 31 |
# File 'lib/push-client.rb', line 29 def unsubscribe(feed, callback, = {}) command('unsubscribe', feed, callback, ) end |