Class: CompositePublisher

Inherits:
Object show all
Defined in:
lib/rake/contrib/publisher.rb

Overview

Manage several publishers as a single entity.

Instance Method Summary (collapse)

Constructor Details

- (CompositePublisher) initialize

A new instance of CompositePublisher



19
20
21
# File 'lib/rake/contrib/publisher.rb', line 19

def initialize
  @publishers = []
end

Instance Method Details

- (Object) add(pub)

Add a publisher to the composite.



24
25
26
# File 'lib/rake/contrib/publisher.rb', line 24

def add(pub)
  @publishers << pub
end

- (Object) upload

Upload all the individual publishers.



29
30
31
# File 'lib/rake/contrib/publisher.rb', line 29

def upload
  @publishers.each { |p| p.upload }
end