Class: Rake::CompositePublisher
- Inherits:
-
Object
- Object
- Rake::CompositePublisher
- Defined in:
- lib/rake/contrib/compositepublisher.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.
5 6 7 |
# File 'lib/rake/contrib/compositepublisher.rb', line 5 def initialize @publishers = [] end |
Instance Method Details
#add(pub) ⇒ Object
Add a publisher to the composite.
10 11 12 |
# File 'lib/rake/contrib/compositepublisher.rb', line 10 def add(pub) @publishers << pub end |
#upload ⇒ Object
Upload all the individual publishers.
15 16 17 |
# File 'lib/rake/contrib/compositepublisher.rb', line 15 def upload @publishers.each { |p| p.upload } end |