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.
7 8 9 |
# File 'lib/rake/contrib/compositepublisher.rb', line 7 def initialize @publishers = [] end |
Instance Method Details
#add(pub) ⇒ Object
Add a publisher to the composite.
12 13 14 |
# File 'lib/rake/contrib/compositepublisher.rb', line 12 def add(pub) @publishers << pub end |
#upload ⇒ Object
Upload all the individual publishers.
17 18 19 |
# File 'lib/rake/contrib/compositepublisher.rb', line 17 def upload @publishers.each { |p| p.upload } end |