Class: GollyUtils::MultiIO

Inherits:
Delegator show all
Defined in:
lib/golly-utils/multi_io.rb

Overview

A fake IO implmentation that writes data to multiple underlying IO objects.

Instance Attribute Summary

Attributes inherited from Delegator

#delegate_to

Instance Method Summary collapse

Methods inherited from Delegator

#clone, #dup, #method_missing, #respond_to?

Constructor Details

#initialize(*targets) ⇒ MultiIO

Returns a new instance of MultiIO.

Parameters:

  • targets

    Real IO objects.



9
10
11
# File 'lib/golly-utils/multi_io.rb', line 9

def initialize(*targets)
  super *targets, delegate_to: :all
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class GollyUtils::Delegator