Sha256: 4451831280db8790eeb7a62d81c449ffe6b4524a111a0ec70347a0d2e8cb3a1a

Contents?: true

Size: 496 Bytes

Versions: 3

Compression:

Stored size: 496 Bytes

Contents

module Vedeu

  class Writer

    attr_reader :writers

    # @return [Vedeu::Writer]
    def self.[](*args)
      new(args)
    end

    # @return [Vedeu::Writer]
    def initialize(writers)
      @writers = writers
    end

    def ==(other)
      writers == other.writers
    end

    # @return [Vedeu::Writer]
    def +(other)
      Writer[*(writers + other.writers)]
    end

    def write(stream)
      @writers.each { |writer| writer.write(stream) }
    end

  end # Consoles

end # Vedeu

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vedeu-0.3.4 lib/vedeu/output/writer.rb
vedeu-0.3.3 lib/vedeu/output/writer.rb
vedeu-0.3.2 lib/vedeu/output/writer.rb