Class: CompositePublisher
- Inherits:
-
Object
- Object
- CompositePublisher
- Defined in:
- lib/rake/contrib/publisher.rb
Overview
Manage several publishers as a single entity.
Instance Method Summary collapse
-
#add(pub) ⇒ Object
Add a publisher to the composite.
-
#initialize ⇒ CompositePublisher
constructor
A new instance of CompositePublisher.
-
#upload ⇒ Object
Upload all the individual publishers.
Constructor Details
#initialize ⇒ CompositePublisher
Returns a new instance of CompositePublisher.
19 20 21 |
# File 'lib/rake/contrib/publisher.rb', line 19 def initialize @publishers = [] end |
Instance Method Details
#add(pub) ⇒ Object
Add a publisher to the composite.
24 25 26 |
# File 'lib/rake/contrib/publisher.rb', line 24 def add(pub) @publishers << pub end |
#upload ⇒ Object
Upload all the individual publishers.
29 30 31 |
# File 'lib/rake/contrib/publisher.rb', line 29 def upload @publishers.each { |p| p.upload } end |