Sha256: 41aa95611cc01cc261b032a2e44671afaf922f8752198e471179712bb4cd0fd5

Contents?: true

Size: 821 Bytes

Versions: 2

Compression:

Stored size: 821 Bytes

Contents

module Rvm2
  module Ui
    class Multi
      class IoWriteRouter

        def initialize(parent, type)
          @parent = parent
          @type   = type
        end
        def write(*args)
          @parent.handlers.each{|h| h.send(@type).write(*args) }
        end
        def <<(*args)
          @parent.handlers.each{|h| h.send(@type).<<(*args) }
        end
        def print(*args)
          @parent.handlers.each{|h| h.send(@type).print(*args) }
        end
        def printf(*args)
          @parent.handlers.each{|h| h.send(@type).printf(*args) }
        end
        def puts(*args)
          @parent.handlers.each{|h| h.send(@type).puts(*args) }
        end
        def write_nonblock(*args)
          @parent.handlers.each{|h| h.send(@type).write_nonblock(*args) }
        end

      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rvm2-ui-0.9.1 lib/rvm2/ui/multi/io_write_router.rb
rvm2-ui-0.9.0 lib/rvm2/ui/multi/io_write_router.rb