class MultiMovingsign::TeeIO
Attributes
destinations[RW]
Public Class Methods
new(*dests)
click to toggle source
# File lib/multi_movingsign/server.rb, line 12 def initialize(*dests) self.destinations = dests end
Public Instance Methods
puts(val)
click to toggle source
# File lib/multi_movingsign/server.rb, line 16 def puts(val) time = Time.now destinations.each do |d| d.puts "#{time}: #{val.to_s}" d.flush end end
write(val)
click to toggle source
# File lib/multi_movingsign/server.rb, line 24 def write(val) destinations.each do |d| d.write val d.flush end end