Class: PushClient::Publisher
- Inherits:
-
Communicator
- Object
- Communicator
- PushClient::Publisher
- Defined in:
- lib/push-client.rb
Constant Summary
Constants inherited from Communicator
Instance Method Summary collapse
-
#initialize(hub) {|_self| ... } ⇒ Publisher
constructor
A new instance of Publisher.
- #publish(*feeds) ⇒ Object
Constructor Details
#initialize(hub) {|_self| ... } ⇒ Publisher
Returns a new instance of Publisher.
45 46 47 48 |
# File 'lib/push-client.rb', line 45 def initialize(hub) super(hub) yield self if block_given? end |
Instance Method Details
#publish(*feeds) ⇒ Object
50 51 52 53 54 55 56 |
# File 'lib/push-client.rb', line 50 def publish(*feeds) feeds.flatten.each do |f| self.class.post("#{@hub}", :body => {'hub.mode' => 'publish', 'hub.url' => f}, :headers => HEADERS) end end |