Class: NoopBackup::Tee
- Inherits:
-
Object
- Object
- NoopBackup::Tee
- Defined in:
- lib/noop_backup/tee.rb
Defined Under Namespace
Classes: Sink
Instance Method Summary collapse
-
#initialize(sinks) ⇒ Tee
constructor
A new instance of Tee.
- #write(chunk) ⇒ Object
Constructor Details
#initialize(sinks) ⇒ Tee
Returns a new instance of Tee.
25 |
# File 'lib/noop_backup/tee.rb', line 25 def initialize(sinks) = @sinks = sinks |
Instance Method Details
#write(chunk) ⇒ Object
27 28 29 30 31 |
# File 'lib/noop_backup/tee.rb', line 27 def write(chunk) @sinks.each { |sink| sink.write(chunk) } chunk.bytesize end |